Add unit testing for account creation
This commit is contained in:
@@ -1,16 +1,9 @@
|
||||
"""
|
||||
This file demonstrates writing tests using the unittest module. These will pass
|
||||
when you run "manage.py test".
|
||||
|
||||
Replace this with more appropriate tests for your application.
|
||||
"""
|
||||
|
||||
from django.test import TestCase
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
||||
class SimpleTest(TestCase):
|
||||
def test_basic_addition(self):
|
||||
"""
|
||||
Tests that 1 + 1 always equals 2.
|
||||
"""
|
||||
self.assertEqual(1 + 1, 2)
|
||||
class AccountCreationTest(TestCase):
|
||||
def testCreation(self):
|
||||
user = User.objects.create_user('ValidUser', 'test@example.com')
|
||||
self.assertIsNotNone(user.minecraftprofile.currencyaccount)
|
||||
user.delete()
|
||||
|
Reference in New Issue
Block a user