コード例 #1
0
ファイル: test_decorators.py プロジェクト: jhutar/robottelo
    def test_project_mode_different_cases(self):
        """Assert ``True`` for different cases of accepted input values
           for project / robottelo modes."""
        accepted_values = ("SAT", "SAt", "SaT", "Sat", "sat", "sAt", "SAM", "SAm", "SaM", "Sam", "sam", "sAm")

        # Test different project values
        conf.properties["main.project"] = "sam"
        for project in accepted_values:
            self.assertTrue(decorators.run_only_on(project))

        # Test different mode values
        for mode in accepted_values:
            conf.properties["main.project"] = mode
            self.assertTrue(decorators.run_only_on("SAT"))
コード例 #2
0
    def test_project_mode_different_cases(self):
        """Assert ``True`` for different cases of accepted input values
           for project / robottelo modes."""
        accepted_values = ('SAT', 'SAt', 'SaT', 'Sat', 'sat', 'sAt',
                           'SAM', 'SAm', 'SaM', 'Sam', 'sam', 'sAm')

        # Test different project values
        conf.properties['main.project'] = 'sam'
        for project in accepted_values:
            self.assertTrue(decorators.run_only_on(project))

        # Test different mode values
        for mode in accepted_values:
            conf.properties['main.project'] = mode
            self.assertTrue(decorators.run_only_on('SAT'))
コード例 #3
0
ファイル: test_decorators.py プロジェクト: cswiii/robottelo
    def test_project_mode_different_cases(self):
        """Assert ``True`` for different cases of accepted input values
           for project / robottelo modes."""
        accepted_values = ('SAT', 'SAt', 'SaT', 'Sat', 'sat', 'sAt',
                           'SAM', 'SAm', 'SaM', 'Sam', 'sam', 'sAm')

        # Test different project values
        conf.properties['main.project'] = 'sam'
        for project in accepted_values:
            self.assertTrue(decorators.run_only_on(project))

        # Test different mode values
        for mode in accepted_values:
            conf.properties['main.project'] = mode
            self.assertTrue(decorators.run_only_on('SAT'))
コード例 #4
0
ファイル: test_decorators.py プロジェクト: jhutar/robottelo
 def test_invalid_mode(self):
     """Assert error is thrown when mode has invalid value."""
     # Invalid value for robottelo mode
     conf.properties["main.project"] = "samtdd"
     with self.assertRaises(decorators.ProjectModeError):
         decorators.run_only_on("sat")
コード例 #5
0
ファイル: test_decorators.py プロジェクト: jhutar/robottelo
 def test_invalid_project(self):
     """Assert error is thrown when project has invalid value."""
     conf.properties["main.project"] = "sam"
     with self.assertRaises(decorators.ProjectModeError):
         decorators.run_only_on("satddfddffdf")
コード例 #6
0
ファイル: test_decorators.py プロジェクト: cswiii/robottelo
 def test_invalid_mode(self):
     """Assert error is thrown when mode has invalid value."""
     # Invalid value for robottelo mode
     conf.properties['main.project'] = 'samtdd'
     with self.assertRaises(decorators.ProjectModeError):
         decorators.run_only_on('sat')
コード例 #7
0
ファイル: test_decorators.py プロジェクト: cswiii/robottelo
 def test_invalid_project(self):
     """Assert error is thrown when project has invalid value."""
     conf.properties['main.project'] = 'sam'
     with self.assertRaises(decorators.ProjectModeError):
         decorators.run_only_on('satddfddffdf')