diff options
author | Jason Myers <jason@jasonamyers.com> | 2013-11-02 23:36:09 -0500 |
---|---|---|
committer | Jason Myers <jason@jasonamyers.com> | 2013-11-02 23:50:49 -0500 |
commit | 7a61c68c50d3837c50e35c252fd76220f08b5290 (patch) | |
tree | 586f16a3f02c2b45ffb3dd2af834c0ef604e099c /tests/m2m_and_m2o | |
parent | 0fdb692c6c94d912f17a3e2ad12413fb072d38ec (diff) | |
download | django-7a61c68c50d3837c50e35c252fd76220f08b5290.tar.gz |
PEP8 cleanup
Signed-off-by: Jason Myers <jason@jasonamyers.com>
Diffstat (limited to 'tests/m2m_and_m2o')
-rw-r--r-- | tests/m2m_and_m2o/models.py | 2 | ||||
-rw-r--r-- | tests/m2m_and_m2o/tests.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/m2m_and_m2o/models.py b/tests/m2m_and_m2o/models.py index c303743f04..482ae9a1fa 100644 --- a/tests/m2m_and_m2o/models.py +++ b/tests/m2m_and_m2o/models.py @@ -13,6 +13,7 @@ from django.utils.encoding import python_2_unicode_compatible class User(models.Model): username = models.CharField(max_length=20) + @python_2_unicode_compatible class Issue(models.Model): num = models.IntegerField() @@ -25,5 +26,6 @@ class Issue(models.Model): class Meta: ordering = ('num',) + class UnicodeReferenceModel(models.Model): others = models.ManyToManyField("UnicodeReferenceModel") diff --git a/tests/m2m_and_m2o/tests.py b/tests/m2m_and_m2o/tests.py index 35443e32e4..e950a839d2 100644 --- a/tests/m2m_and_m2o/tests.py +++ b/tests/m2m_and_m2o/tests.py @@ -50,7 +50,7 @@ class RelatedObjectTests(TestCase): # These queries combine results from the m2m and the m2o relationships. # They're three ways of saying the same thing. self.assertQuerysetEqual( - Issue.objects.filter(Q(cc__id__exact = r.id) | Q(client=r.id)), [ + Issue.objects.filter(Q(cc__id__exact=r.id) | Q(client=r.id)), [ 1, 2, 3, @@ -74,6 +74,7 @@ class RelatedObjectTests(TestCase): lambda i: i.num ) + class RelatedObjectUnicodeTests(TestCase): def test_m2m_with_unicode_reference(self): """ |