def test_update(self): """Verify only the file is updated.""" instance = MockMappable() instance.yorm_mapper.reset_mock() utilities.update_file(instance) assert not instance.yorm_mapper.fetch.called assert instance.yorm_mapper.store.called
def test_update_wrong_base(self): """Verify an exception is raised with the wrong base.""" instance = Mock() with pytest.raises(common.UseageError): utilities.update_file(instance)