Last active
December 19, 2018 11:25
-
-
Save sharkdevs/a4a8615be0b69e13b2d75e1a2ab00d81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test import TestCase | |
from users import userRegistration | |
class UserRegistartionTest(TestCase): | |
"""set up the tests""" | |
def setup(): | |
user = { | |
name : "", | |
email : "", | |
password : "" | |
} | |
"""test that a user cannot submit empty details on registration""" | |
def test_user_cannot_submit_empty_data(): | |
self.assertEqual(userRegistration(user), "You cannot submit empty data") |
Ensure to separate your methods by putting a blank line between them. Also, check how your class has been named. Use UserRegistrationTest
instead of UserRegistartionTest
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Sharkdevs,
Overall a simple and well-written code.
I have a concern on the positioning of the Docstring
test that a user cannot submit empty details on registration
It does not seem to conform with convention.
Regards
Steven Ennis