Add unit testing for account creation

This commit is contained in:
Trever Fischer
2012-03-05 17:57:49 -05:00
parent 374a8225ef
commit 19f75d12d0

View File

@@ -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()