Skip to content

Commit

Permalink
Fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurora0000 committed Jun 24, 2015
1 parent f8ee75f commit d272669
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions forums/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
from .serializers import TopicSerializer
from .views import TopicDetail, AnyPostDetail

"""

class TagTestCase(TestCase):
def setUp(self):
User.objects.create_superuser('admin', 'fake@fakeness.net', 'null')
Tag.objects.create(name='test', colour=0xFFFFFF)
Tag.objects.create(name='\\#231[][=-', colour=0xDEAD12)
Tag.objects.create(name='test', description='potato')
Tag.objects.create(name='\\#231[][=-', description='ggggh')

def test_colours_stored_correctly(self):
# Check that everything gets stored right.
test = Tag.objects.get(name='test')
rand_chars = Tag.objects.get(name='\\#231[][=-')
self.assertEqual(rand_chars.colour, 0xDEAD12)
self.assertEqual(test.colour, 0xFFFFFF)
self.assertEqual(rand_chars.description, 'ggggh')
self.assertEqual(test.desciption, 'potato')

def test_api_is_correct(self):
factory = APIRequestFactory()
Expand All @@ -28,7 +28,6 @@ def test_api_is_correct(self):
response = view(request)
self.assertEqual(response.data[0]['name'], 'test')
self.assertEqual(response.data[1]['name'], '\\#231[][=-')
"""


class SerializerReplyTestCase(TestCase):
Expand Down

0 comments on commit d272669

Please sign in to comment.