Пример #1
0
 def test_get_prep_value_filled(self):
     field = DictAsJsonField()
     result = field.get_prep_value({'a': 'b'})
     self.assertEqual(result, u'{"a": "b"}')
Пример #2
0
 def test_get_prep_value_filled(self):
     field = DictAsJsonField()
     result = field.get_prep_value({'a': 'b'})
     assert result == u'{"a": "b"}'
Пример #3
0
 def test_get_prep_value_empty(self):
     field = DictAsJsonField()
     result = field.get_prep_value(None)
     self.assertEqual(result, None)
Пример #4
0
 def test_get_prep_value_empty(self):
     field = DictAsJsonField()
     result = field.get_prep_value(None)
     assert result is None