Beispiel #1
0
    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
Beispiel #2
0
    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
Beispiel #3
0
    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)
Beispiel #4
0
    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)