Commit b3690332 authored by David Haynes's avatar David Haynes
Browse files

Test if the auto registereduser creation function works

- our first real test!
parent 481b4a97
Pipeline #728 passed with stage
in 56 seconds
# Django Imports # Django Imports
from django.test import TestCase from django.test import TestCase
from django.contrib.auth.models import User
# App Imports # App Imports
from go.models import URL, RegisteredUser from go.models import URL, RegisteredUser
...@@ -20,5 +21,10 @@ class URLTest(TestCase): ...@@ -20,5 +21,10 @@ class URLTest(TestCase):
""" """
class RegisteredUserTest(TestCase): class RegisteredUserTest(TestCase):
def test_Django_Test(self): def setUp(self):
self.assertEqual(1+1, 2) User.objects.create(username='dhaynes', password='password')
def test_RegisteredUserCreation(self):
getUser = User.objects.get(username='dhaynes')
getRegisteredUser = RegisteredUser.objects.get(user=getUser)
self.assertTrue(getRegisteredUser)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment