def test_loads(self): with pytest.raises(NotImplementedError): BaseSerializer().loads('')
def test_init_encoding(self): serializer = BaseSerializer(encoding='whatever') assert serializer.DEFAULT_ENCODING == 'utf-8' assert serializer.encoding == 'whatever'
def test_dumps(self): with pytest.raises(NotImplementedError): BaseSerializer().dumps("")
def test_init(self): serializer = BaseSerializer() assert serializer.DEFAULT_ENCODING == 'utf-8' assert serializer.encoding == 'utf-8'
def test_init_encoding(self): serializer = BaseSerializer(encoding="whatever") assert serializer.DEFAULT_ENCODING == "utf-8" assert serializer.encoding == "whatever"