Пример #1
0
    def test_process_main(self):
        repo_id = 'repo-xyz'
        path = 'root/path-123'
        branches = ['branch-1', 'branch-2']

        # test
        step = Pull()
        step.parent = Mock(storage_dir=path, repo_id=repo_id, branches=branches)
        step._pull = Mock()
        step.process_main()

        # validation
        step._pull.assert_called_once_with(path, repo_id, branches)
Пример #2
0
    def test_process_main(self):
        repo_id = 'repo-xyz'
        path = 'root/path-123'
        branches = ['branch-1', 'branch-2']

        # test
        step = Pull()
        step.parent = Mock(storage_dir=path,
                           repo_id=repo_id,
                           branches=branches)
        step._pull = Mock()
        step.process_main()

        # validation
        step._pull.assert_called_once_with(path, repo_id, branches)
Пример #3
0
    def test_process_main(self):
        remote_id = 'remote-123'
        path = 'root/path-123'
        branches = ['branch-1', 'branch-2']

        # test
        step = Pull()
        step.parent = Mock(storage_path=path, remote_id=remote_id, branches=branches)
        step._pull = Mock()
        step.process_main()

        # validation
        self.assertEqual(
            step._pull.call_args_list,
            [
                ((path, remote_id, branches[0]), {}),
                ((path, remote_id, branches[1]), {}),
            ])
Пример #4
0
    def test_process_main(self):
        remote_id = 'remote-123'
        path = 'root/path-123'
        branches = ['branch-1', 'branch-2']

        # test
        step = Pull()
        step.parent = Mock(storage_path=path,
                           remote_id=remote_id,
                           branches=branches)
        step._pull = Mock()
        step.process_main()

        # validation
        self.assertEqual(step._pull.call_args_list, [
            ((path, remote_id, branches[0]), {}),
            ((path, remote_id, branches[1]), {}),
        ])