コード例 #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
コード例 #2
0
ファイル: test_utilities.py プロジェクト: gitter-badger/yorm
    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
コード例 #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)
コード例 #4
0
ファイル: test_utilities.py プロジェクト: gitter-badger/yorm
    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)