Ejemplo n.º 1
0
 def test_manifest_found_no_instructions(self):
     metric = MissingOsgiManifest('test', 'description of a test', metrics_logger=Mock()).configure(Mock(), False)
     metric.pre_files_scan('bad_plugin')
     self.assertEqual(metric.wants_file('META-INF/MANIFEST.MF'), True, "Should want to look at manifest")
     metric.on_read_line("this is a manifest, but it's a bad one.")
     metric.post_files_scan('bad_plugin')
     self.assertEqual(1, metric.value, "Should have a hit")
Ejemplo n.º 2
0
 def test_no_manifest_found(self):
     metric = MissingOsgiManifest('test',
                                  'description of a test',
                                  metrics_logger=Mock()).configure(
                                      Mock(), False)
     metric.pre_files_scan('bad_plugin')
     metric.post_files_scan('bad_plugin')
     self.assertEqual(1, metric.value, "Should have a hit")
Ejemplo n.º 3
0
 def test_manifest_found_no_instructions(self):
     metric = MissingOsgiManifest('test',
                                  'description of a test',
                                  metrics_logger=Mock()).configure(
                                      Mock(), False)
     metric.pre_files_scan('bad_plugin')
     self.assertEqual(metric.wants_file('META-INF/MANIFEST.MF'), True,
                      "Should want to look at manifest")
     metric.on_read_line("this is a manifest, but it's a bad one.")
     metric.post_files_scan('bad_plugin')
     self.assertEqual(1, metric.value, "Should have a hit")
Ejemplo n.º 4
0
 def test_no_manifest_found(self):
     metric = MissingOsgiManifest('test', 'description of a test', metrics_logger=Mock()).configure(Mock(), False)
     metric.pre_files_scan('bad_plugin')
     metric.post_files_scan('bad_plugin')
     self.assertEqual(1, metric.value, "Should have a hit")