add test_computer_create_view
This commit is contained in:
parent
d2784a6534
commit
58ee81791e
|
@ -0,0 +1,16 @@
|
|||
from django.test import Client
|
||||
import pytest
|
||||
|
||||
|
||||
pytestmark = pytest.mark.django_db
|
||||
|
||||
|
||||
def test_computer_create_view(create_admin_user):
|
||||
fixture = create_admin_user()
|
||||
client = Client()
|
||||
client.login(username="pharma-admin", password="password")
|
||||
data = {'name': 'Test Computer',
|
||||
'customer': fixture['customer'].id}
|
||||
url = '/customer/{}/create/computer/'.format(fixture['customer'].id)
|
||||
response = client.post(url, data)
|
||||
assert response.status_code == 302
|
Loading…
Reference in New Issue