def test_version_pin_validator_should_success(self): # example workflow in plugin_examples directory. Run tests with these files directory_to_test = "plugin_examples/good_test" file_to_test = "plugin.spec.yaml" result = validate(directory_to_test, file_to_test, False, True, [VersionPinValidator()]) self.assertEqual(result, 0)
def test_version_pin_validator_should_fail_when_no_version_pin(self): self.replace_requirements( "plugin_examples/version_pin_validator/requirements.txt", "ldap3") # example workflow in plugin_examples directory. Run tests with these files directory_to_test = "plugin_examples/version_pin_validator" file_to_test = "plugin.spec.yaml" result = validate(directory_to_test, file_to_test, False, True, [VersionPinValidator()]) self.assertEqual(result, 1)
def test_version_pin_validator_should_success_when_git(self): self.replace_requirements( "plugin_examples/version_pin_validator/requirements.txt", "git+git://github.com/komand/[email protected]#egg=pycrits") # example workflow in plugin_examples directory. Run tests with these files directory_to_test = "plugin_examples/version_pin_validator" file_to_test = "plugin.spec.yaml" result = validate(directory_to_test, file_to_test, False, True, [VersionPinValidator()]) self.assertEqual(result, 0)