Skip to content

Commit

Permalink
Use snake case for test method names.
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes committed Nov 25, 2018
1 parent 414c50d commit f3a9260
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setUp(self):
MinimalTestingModel)
return super(PickledObjectFieldTests, self).setUp()

def testDataIntegrity(self):
def test_data_integrity(self):
"""
Tests that data remains the same when saved to and fetched from
the database, whether compression is enabled or not.
Expand All @@ -43,7 +43,7 @@ def testDataIntegrity(self):
self.assertEqual((D1, S1, T1, L1), model_test.default_pickle_field)
self.assertEqual(date.today(), model_test.callable_pickle_field)

def testLookups(self):
def test_lookups(self):
"""
Tests that lookups can be performed on data once stored in the
database, whether compression is enabled or not.
Expand Down Expand Up @@ -134,14 +134,14 @@ def testLookups(self):
self.assertEqual(value, model_test.pickle_field)
model_test.delete()

def testLimitLookupsType(self):
def test_limit_lookups_type(self):
"""
Test that picklefield supports lookup type limit
"""
with self.assertRaisesMessage(TypeError, 'Lookup type gte is not supported'):
TestingModel.objects.filter(pickle_field__gte=1)

def testSerialization(self):
def test_serialization(self):
model = MinimalTestingModel(pk=1, pickle_field={'foo': 'bar'})
serialized = serializers.serialize('json', [model])
data = json.loads(serialized)
Expand All @@ -159,7 +159,7 @@ def testSerialization(self):
for deserialized_test in serializers.deserialize('json', serialized):
self.assertEqual(deserialized_test.object, model)

def testNoCopy(self):
def test_no_copy(self):
TestingModel.objects.create(
pickle_field='Copy Me',
compressed_pickle_field='Copy Me',
Expand Down

0 comments on commit f3a9260

Please sign in to comment.