Skip to content

Instantly share code, notes, and snippets.

@sharkdevs
Last active December 19, 2018 11:25
Show Gist options
  • Save sharkdevs/a4a8615be0b69e13b2d75e1a2ab00d81 to your computer and use it in GitHub Desktop.
Save sharkdevs/a4a8615be0b69e13b2d75e1a2ab00d81 to your computer and use it in GitHub Desktop.
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")
@waracci
Copy link

waracci commented Dec 19, 2018

Ensure your code conforms to the pep8 standards. 👍

@Teatoller
Copy link

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

@Paulvitalis200
Copy link

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