Exemplo n.º 1
0
 def test_version_is_unsupported(self):
     checker = ApiDeprecationChecker("1.10.6")
     checker.deprecated_versions = {
         "test/v1": {
             "since": "1.8.0",
             "until": "1.10.0",
             "resources": [
                 "Deployment",
             ],
         }
     }
     with self.assertRaises(DeprecationError):
         checker._is_deprecated("test/v1", "Deployment")
Exemplo n.º 2
0
 def test_version_not_in_list(self):
     checker = ApiDeprecationChecker("1.9.7")
     checker.deprecated_versions = {
         "test/v1": {
             "since": "1.8.0",
             "until": "1.10.0",
             "resources": [
                 "Deployment",
             ],
         }
     }
     self.assertFalse(checker._is_deprecated("test/v2", "Deployment"))
Exemplo n.º 3
0
 def test_version_is_deprecated_equal(self):
     checker = ApiDeprecationChecker("1.8.0")
     checker.deprecated_versions = {
         "test/v1": {
             "since": "1.8.0",
             "until": "1.10.0",
             "resources": [
                 "Deployment",
             ],
         }
     }
     self.assertTrue(checker._is_deprecated("test/v1", "Deployment"))