Skip to content
Snippets Groups Projects
Commit 96319a00 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Python 3: fix a few tests with decoding response content

parent f1015549
No related branches found
No related tags found
1 merge request!29Python3
This commit is part of merge request !29. Comments created here will be created in the context of that merge request.
......@@ -50,4 +50,4 @@ def test_valid_graceids(graceid):
call_args, _ = mock_super_tiv.call_args
assert mock_super_tiv.call_count == 1
assert len(call_args) == 1
assert call_args[0].encode() == graceid.upper().strip()
assert call_args[0] == graceid.upper().strip()
......@@ -147,7 +147,8 @@ def test_update_with_no_new_data(grb_user, internal_group, data):
# Check response
assert response.status_code == 400
assert 'Request would not modify the GRB event' in response.content
assert 'Request would not modify the GRB event' \
in response.content.decode()
@pytest.mark.parametrize("data",
......@@ -176,7 +177,7 @@ def test_update_with_bad_data(grb_user, internal_group, data):
# Check response
assert response.status_code == 400
assert 'must be a float' in response.content
assert 'must be a float' in response.content.decode()
@pytest.mark.django_db
......@@ -206,4 +207,4 @@ def test_update_non_grbevent(grb_user, internal_group):
# Check response
assert response.status_code == 400
assert 'Cannot update GRB event parameters for non-GRB event' \
in response.content
in response.content.decode()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment