refactor: prefix all manifest data classes with Manifest
Avoids name collisions with same-named runtime/plugin classes (e.g. manifest AgentProvider vs plugin AgentProvider ABC, manifest EgressRoute vs runtime EgressRoute). Renamed: AgentProvider → ManifestAgentProvider (manifest_agent.py) Agent → ManifestAgent (manifest_agent.py) EgressRoute → ManifestEgressRoute (manifest_egress.py) PathMatch → ManifestPathMatch (manifest_egress.py) HeaderMatch → ManifestHeaderMatch (manifest_egress.py) MatchEntry → ManifestMatchEntry (manifest_egress.py) EgressConfig → ManifestEgressConfig (manifest_egress.py) Bottle → ManifestBottle (manifest.py) ProvisionedKeyConfig → ManifestProvisionedKeyConfig (manifest_git.py) GitEntry → ManifestGitEntry (manifest_git.py) GitUser → ManifestGitUser (manifest_git.py)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
from bot_bottle.manifest import ManifestError, GitUser, Manifest
|
||||
from bot_bottle.manifest import ManifestError, ManifestGitUser, Manifest
|
||||
|
||||
|
||||
def _error_message(callable_, *args, **kwargs) -> str: # type: ignore
|
||||
@@ -99,13 +99,13 @@ class TestGitUserDirect(unittest.TestCase):
|
||||
"""Direct GitUser dataclass exercises (no manifest wrapper)."""
|
||||
|
||||
def test_is_empty_default(self):
|
||||
self.assertTrue(GitUser().is_empty())
|
||||
self.assertTrue(ManifestGitUser().is_empty())
|
||||
|
||||
def test_is_empty_false_when_name_set(self):
|
||||
self.assertFalse(GitUser(name="x").is_empty())
|
||||
self.assertFalse(ManifestGitUser(name="x").is_empty())
|
||||
|
||||
def test_is_empty_false_when_email_set(self):
|
||||
self.assertFalse(GitUser(email="x@y").is_empty())
|
||||
self.assertFalse(ManifestGitUser(email="x@y").is_empty())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user