Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 12
0
 def test_config_extra_attribute(self):
     """
     Accepts configuration file with extra attributes.
     """
     self.config['extras'] = 3
     validate_configuration(self.config)
Exemplo n.º 13
0
 def test_valid(self):
     """
     Accepts configuration file with valid entries.
     """
     validate_configuration(self.config)
Exemplo n.º 14
0
 def test_valid(self):
     """
     Accepts configuration file with valid entries.
     """
     validate_configuration(self.config)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 18
0
 def test_config_extra_attribute(self):
     """
     Accepts configuration file with extra attributes.
     """
     self.config['extras'] = 3
     validate_configuration(self.config)