@@ -0,0 +1,1275 @@
+from django.test import TestCase, override_settings%0A%0Afrom ..models import PublicMessage, Room, User%0A%0A%0Aclass TestDataMixin(object):%0A    @classmethod%0A    def setUpTestData(cls):%0A        cls.user1 = User.objects.create(%0A                username='testclient1', password='sha1$6efc0$f93efe9fd7542f25a7be94871ea45aa95de57161',%0A                email='testclient1@example.com', is_staff=False, is_active=True%0A        )%0A        cls.room = Room.objects.create(%0A                name=%22room%22, pinned=False%0A        )%0A%0A%0A@override_settings(USE_TZ=False, PASSWORD_HASHERS=%5B'django.contrib.auth.hashers.SHA1PasswordHasher'%5D)%0Aclass TestModels(TestDataMixin, TestCase):%0A    def test_message_breaking(self):%0A        entered_text = %22hello%5Cnworld%22%0A        expected_text = %22hello%3Cbr%3Eworld%22%0A        message = PublicMessage.objects.create(room=self.room, author=self.user1, text=entered_text)%0A        self.assertEqual(PublicMessage.objects.get(id=message.id).text, expected_text)%0A%0A    def test_message_stripping(self):%0A        entered_text = %22     %5Ct%5Cr%5Cn    hello      %5Ct%5Cr%5Cn    %22%0A        expected_text = %22hello%22%0A        message = PublicMessage.objects.create(room=self.room, author=self.user1, text=entered_text)%0A        self.assertEqual(PublicMessage.objects.get(id=message.id).text, expected_text)%0A

add some tests for models