예제 #1
0
    def test_s3file(self, mock_touch):
        file = S3File.create(
            _path='afile2',
            name='child2',
            target=self.node,
            provider='test',
            materialized_path='/long/path/to/name',
        )

        file.touch(None)
        file.touch('bar', version='foo')
        file.touch(None, version='zyzz', bar='baz')

        mock_touch.assert_has_calls([
            mock.call(None),
            mock.call('bar', version='foo'),
            mock.call(None, version='zyzz', bar='baz'),
        ])
예제 #2
0
    def test_s3file(self, mock_touch):
        file = S3File.create(
            _path='afile2',
            name='child2',
            target=self.node,
            provider='test',
            materialized_path='/long/path/to/name',
        )

        file.touch(None)
        file.touch('bar', version='foo')
        file.touch(None, version='zyzz', bar='baz')

        mock_touch.assert_has_calls([
            mock.call(None),
            mock.call('bar', version='foo'),
            mock.call(None, version='zyzz', bar='baz'),
        ])