Exemplo n.º 1
0
 def test_with_params(self, instance: ExceptionWithCode, catalog):
     instance.__dict__['catalog'] = catalog
     cloned = instance.with_params(a=1)
     assert cloned.code == 'code'
     assert cloned.area == 'area'
     assert cloned.params == {'a': 1}
     assert cloned.catalog is catalog
     assert cloned == instance
     assert cloned is not instance
 def test_with_params(self, instance: ExceptionWithCode, catalog):
     instance.__dict__['catalog'] = catalog
     cloned = instance.with_params(a=1)
     assert cloned.code == 'code'
     assert cloned.area == 'area'
     assert cloned.params == {'a': 1}
     assert cloned.catalog is catalog
     assert cloned == instance
     assert cloned is not instance
Exemplo n.º 3
0
 def test_with_params(self, instance: ExceptionWithCode, catalog):
     instance.__dict__["catalog"] = catalog
     cloned = instance.with_params(a=1)
     assert cloned.code == "code"
     assert cloned.area == "area"
     assert cloned.params == {"a": 1}
     assert cloned.catalog is catalog
     assert cloned == instance
     assert cloned is not instance