Created
June 4, 2020 22:46
-
-
Save nashmaniac/71c4ac99277d47b5cfb1187787c003b9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 django.contrib.auth.models import User | |
# Create your tests here. | |
class UserTestCase(TestCase): | |
def test_user(self): | |
username = 'shetu' | |
password = 'hello' | |
u = User(username=username) | |
u.set_password(password) | |
u.save() | |
self.assertEqual(u.username, username) | |
self.assertTrue(u.check_password(password)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment