Skip to content

Commit

Permalink
added the first test
Browse files Browse the repository at this point in the history
  • Loading branch information
mwanjajoel committed Aug 25, 2020
1 parent f58a76a commit a4fa081
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/unit/create_user_test.py → tests/test_create_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

# create a Pytest mark to test user creation so as to access the db
@pytest.mark.django_db
def create_user_test():
User.objects.create_user('momoapi', '[email protected]', 'momopassword')
def test_user_create():
User.objects.create_user(
username='momoapi',
email='[email protected]',
password='momopassword')
assert User.objects.count() == 1

0 comments on commit a4fa081

Please sign in to comment.