Beispiel #1
0
 def test_loads(self):
     with pytest.raises(NotImplementedError):
         BaseSerializer().loads('')
Beispiel #2
0
 def test_init_encoding(self):
     serializer = BaseSerializer(encoding='whatever')
     assert serializer.DEFAULT_ENCODING == 'utf-8'
     assert serializer.encoding == 'whatever'
Beispiel #3
0
 def test_dumps(self):
     with pytest.raises(NotImplementedError):
         BaseSerializer().dumps("")
Beispiel #4
0
 def test_init(self):
     serializer = BaseSerializer()
     assert serializer.DEFAULT_ENCODING == 'utf-8'
     assert serializer.encoding == 'utf-8'
Beispiel #5
0
 def test_init_encoding(self):
     serializer = BaseSerializer(encoding="whatever")
     assert serializer.DEFAULT_ENCODING == "utf-8"
     assert serializer.encoding == "whatever"