Esempio n. 1
0
    def test_given_releases_wrong_order_then_error(self, _1):
        releases = ['4-4', '4-1']
        expected_error_message = "Input releases in correct order (<earlier> <later>)"

        dls_logs_since_release.check_releases_valid(releases, self.parser)

        self.mock_error.assert_called_once_with(expected_error_message)
Esempio n. 2
0
    def test_given_releases_1_then_error(self):
        releases = ['4-1']
        expected_error_message = "To specify just start or just end point, use -e or -l flag."

        dls_logs_since_release.check_releases_valid(releases, self.parser)

        self.mock_error.assert_called_once_with(expected_error_message)
Esempio n. 3
0
    def test_given_releases_more_than_2_then_error(self):
        releases = ['4-1', '4-4', '4-5']
        expected_error_message = "Only two releases can be specified (start and end point)"

        dls_logs_since_release.check_releases_valid(releases, self.parser)

        self.mock_error.assert_called_once_with(expected_error_message)
    def test_given_releases_wrong_order_then_error(self, _1):
        releases = ['4-4', '4-1']
        expected_error_message = "Input releases in correct order (<earlier> <later>)"

        dls_logs_since_release.check_releases_valid(releases, self.parser)

        self.mock_error.assert_called_once_with(expected_error_message)
    def test_given_releases_more_than_2_then_error(self):
        releases = ['4-1', '4-4', '4-5']
        expected_error_message = "Only two releases can be specified (start and end point)"

        dls_logs_since_release.check_releases_valid(releases, self.parser)

        self.mock_error.assert_called_once_with(expected_error_message)
    def test_given_releases_1_then_error(self):
        releases = ['4-1']
        expected_error_message = "To specify just start or just end point, use -e or -l flag."

        dls_logs_since_release.check_releases_valid(releases, self.parser)

        self.mock_error.assert_called_once_with(expected_error_message)
Esempio n. 7
0
    def test_given_releases_with_HEAD_then_no_error(self, _1):
        releases = ['4-1', 'HEAD']

        dls_logs_since_release.check_releases_valid(releases, self.parser)
Esempio n. 8
0
    def test_given_releases_correct_order_then_error(self, _1):
        releases = ['4-1', '4-4']

        dls_logs_since_release.check_releases_valid(releases, self.parser)
    def test_given_releases_with_HEAD_then_no_error(self, _1):
        releases = ['4-1', 'HEAD']

        dls_logs_since_release.check_releases_valid(releases, self.parser)
    def test_given_releases_correct_order_then_error(self, _1):
        releases = ['4-1', '4-4']

        dls_logs_since_release.check_releases_valid(releases, self.parser)