Exemplo n.º 1
0
 def test_no_args(self, export):
     persister = Mock()
     persister_export = Mock()
     export(persister, persister_export)
     persister.read.assert_called_with(None)
     persister_export.write.assert_called_with(persister.read())
     persister_export.activate.assert_called_with(persister_export.write())
Exemplo n.º 2
0
 def test_activate(self, export):
     persister_export = Mock()
     export(Mock(), persister_export, activate=False)
     assert persister_export.activate.call_count == 0
Exemplo n.º 3
0
 def test_model_version(self, export):
     persister = Mock()
     export(persister, Mock(), model_version=123)
     persister.read.assert_called_with(123)