add check for status codes
When there is a 404 then there wouldn't be a "Novartis" string present so the test would still pass.
This commit is contained in:
parent
00725cec8a
commit
3daf05a5c3
|
@ -23,7 +23,8 @@ def test_customer_list_view_no_customer(create_admin_user):
|
|||
client = Client()
|
||||
client.login(username="novartis-admin", password="password")
|
||||
response = client.get('/')
|
||||
assert "Novartis" not in response.content.decode('utf8')
|
||||
assert (response.status_code == 200
|
||||
and "Novartis" not in response.content.decode('utf8'))
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
|
|
Loading…
Reference in New Issue