X-Git-Url: http://gitweb.fperrin.net/?p=djsite.git;a=blobdiff_plain;f=quotes%2Ftests.py;h=66ff00b946b8500a034412e020f80b85fce940ad;hp=fe7e0a80456ac99edd9adbe959ecb4dce352e7a5;hb=ba8a1a46983d9e26f70a6dab5a2a3aa9ebb5425b;hpb=0a2f1c977154f674843c1fbe63084e7d0599a037 diff --git a/quotes/tests.py b/quotes/tests.py index fe7e0a8..66ff00b 100644 --- a/quotes/tests.py +++ b/quotes/tests.py @@ -9,11 +9,13 @@ class QuoteTest(TestCase): a1 = Author.objects.create(name="JFK") w1 = Work.objects.create(name="Berlin speech", author=a1) q1 = Quote.objects.create(text="Ich bin...", work=w1) + self.q1 = q1 def test_one(self): q = Quote.objects.filter(text__startswith="Ich") self.assertEqual(q.count(), 1) q = q[0] + self.assertEqual(q, self.q1) self.assertEqual(q.work.author.name, "JFK") class ViewsTest(TestCase):