Exemplo n.º 1
0
    def test_clean_stage_order(self):
        self.handler.clean(step=steps.STAGE)

        # Verify the step cleaning order
        self.assertThat(len(self.manager_mock.mock_calls), Equals(2))
        self.manager_mock.assert_has_calls(
            [call.clean_prime({}), call.clean_stage({})])
Exemplo n.º 2
0
    def test_clean_stage_order(self):
        handler = pluginhandler.load_plugin('test_part', 'nil')
        handler.clean(step='stage')

        # Verify the step cleaning order
        self.assertEqual(2, len(self.manager_mock.mock_calls))
        self.manager_mock.assert_has_calls([
            call.clean_strip({}),
            call.clean_stage({}),
        ])
Exemplo n.º 3
0
    def test_clean_pull_order(self):
        self.handler.clean(step=steps.PULL)

        # Verify the step cleaning order
        self.assertThat(len(self.manager_mock.mock_calls), Equals(4))
        self.manager_mock.assert_has_calls([
            call.clean_prime({}),
            call.clean_stage({}),
            call.clean_build(),
            call.clean_pull(),
        ])