Exemple #1
0
 def test_check_compatibility__manifest_version_12__exception_raised(
         self, ext_dir):
     manifest = ExtensionManifest('test_extension', {
         'api_version': '0',
         'manifest_version': '12'
     }, ext_dir)
     with pytest.raises(VersionIncompatibilityError):
         manifest.check_compatibility()
 def test_check_compatibility__manifest_version_12__exception_raised(self, ext_dir):
     manifest = ExtensionManifest('test_extension', {'api_version': '0', 'manifest_version': '12'}, ext_dir)
     with pytest.raises(VersionIncompatibilityError):
         manifest.check_compatibility()
 def test_check_compatibility__api_version_1__no_exceptions(self, ext_dir):
     manifest = ExtensionManifest('test_extension', {'api_version': '1', 'manifest_version': '1'}, ext_dir)
     manifest.check_compatibility()
 def test_check_compatibility__manifest_version_12__exception_raised(self, ext_dir):
     manifest = ExtensionManifest('test_extension', {'required_api_version': '0'}, ext_dir)
     with pytest.raises(ExtensionManifestError) as e:
         manifest.check_compatibility()
     assert e.value.error_name == ErrorName.ExtensionCompatibilityError.value
 def test_check_compatibility__required_api_version_1__no_exceptions(self, ext_dir):
     manifest = ExtensionManifest('test_extension', {'required_api_version': '2'}, ext_dir)
     manifest.check_compatibility()