Example #1
0
 def test_empty_metrics(self):
     """
     Rejects configuration file with empty metrics attribute.
     """
     self.config['metrics'] = {}
     with self.assertRaises(ValidationError):
         validate_configuration(self.config)
Example #2
0
 def test_missing_metrics(self):
     """
     Rejects configuration file with missing metrics attribute.
     """
     del self.config['metrics']
     with self.assertRaises(ValidationError):
         validate_configuration(self.config)
Example #3
0
 def test_empty_scenarios(self):
     """
     Rejects configuration file with empty scenarios attribute.
     """
     self.config['scenarios'] = {}
     with self.assertRaises(ValidationError):
         validate_configuration(self.config)
Example #4
0
 def test_missing_scenarios(self):
     """
     Rejects configuration file with missing scenarios attribute.
     """
     del self.config['scenarios']
     with self.assertRaises(ValidationError):
         validate_configuration(self.config)
Example #5
0
 def test_multiple_metrics(self):
     """
     Accepts configuration file with multiple metrics.
     """
     self.config['metrics'].append({
         'name': 'another',
         'type': 'another'
     })
     validate_configuration(self.config)
Example #6
0
 def test_multiple_scenarios(self):
     """
     Accepts configuration file with multiple scenarios.
     """
     self.config['scenarios'].append({
         'name': 'another',
         'type': 'another'
     })
     validate_configuration(self.config)
Example #7
0
 def test_multiple_operations(self):
     """
     Accepts configuration file with multiple operations.
     """
     self.config['operations'].append({
         'name': 'another',
         'type': 'another'
     })
     validate_configuration(self.config)
Example #8
0
 def test_multiple_scenarios(self):
     """
     Accepts configuration file with multiple scenarios.
     """
     self.config['scenarios'].append({'name': 'another', 'type': 'another'})
     validate_configuration(self.config)
Example #9
0
 def test_metric_extra_attribute(self):
     """
     Accepts configuration file with extra attributes on metrics.
     """
     self.config['metrics'][0]['extras'] = 3
     validate_configuration(self.config)
Example #10
0
 def test_operation_extra_attribute(self):
     """
     Accepts configuration file with extra attributes on operations.
     """
     self.config['operations'][0]['extras'] = 3
     validate_configuration(self.config)
Example #11
0
 def test_scenario_extra_attribute(self):
     """
     Accepts configuration file with extra attributes on scenario.
     """
     self.config['scenarios'][0]['extras'] = 3
     validate_configuration(self.config)
Example #12
0
 def test_config_extra_attribute(self):
     """
     Accepts configuration file with extra attributes.
     """
     self.config['extras'] = 3
     validate_configuration(self.config)
Example #13
0
 def test_valid(self):
     """
     Accepts configuration file with valid entries.
     """
     validate_configuration(self.config)
Example #14
0
 def test_valid(self):
     """
     Accepts configuration file with valid entries.
     """
     validate_configuration(self.config)
Example #15
0
 def test_metric_extra_attribute(self):
     """
     Accepts configuration file with extra attributes on metrics.
     """
     self.config['metrics'][0]['extras'] = 3
     validate_configuration(self.config)
Example #16
0
 def test_operation_extra_attribute(self):
     """
     Accepts configuration file with extra attributes on operations.
     """
     self.config['operations'][0]['extras'] = 3
     validate_configuration(self.config)
Example #17
0
 def test_scenario_extra_attribute(self):
     """
     Accepts configuration file with extra attributes on scenario.
     """
     self.config['scenarios'][0]['extras'] = 3
     validate_configuration(self.config)
Example #18
0
 def test_config_extra_attribute(self):
     """
     Accepts configuration file with extra attributes.
     """
     self.config['extras'] = 3
     validate_configuration(self.config)