Skip to content

Commit

Permalink
Simplify test with Python2AssertMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Etienne committed Nov 28, 2014
1 parent 560be32 commit 0e8eabe
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions user_management/models/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class InvalidUser(self.model):
self.assertEqual(errors, expected)


class TestCustomNameUser(TestCase):
class TestCustomNameUser(utils.APIRequestTestCase):
model = models.CustomNameUser

def test_fields(self):
Expand All @@ -305,12 +305,7 @@ def test_fields(self):
'avatar',
}

try:
# python 3 only:
self.assertCountEqual(fields, expected)
except AttributeError:
# python 2 only:
self.assertItemsEqual(fields, expected)
self.assertCountEqual(fields, expected)

def test_name(self):
expected = u'Cú Chulainn'
Expand Down

0 comments on commit 0e8eabe

Please sign in to comment.