refactor: move Url.public to View.public (#1140)

* refactor: move Url.public to View.public

* refactor: fix tests / imports
This commit is contained in:
Juro Oravec 2025-04-21 23:12:40 +02:00 committed by GitHub
parent b49002b545
commit 519529d4e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 291 additions and 336 deletions

View file

@ -97,7 +97,7 @@ class TestExtensionsListCommand:
call_command("components", "ext", "list")
output = out.getvalue()
assert output.strip() == "name \n========\ncache \ndefaults\nview \nurl"
assert output.strip() == "name \n========\ncache \ndefaults\nview"
@djc_test(
components_settings={"extensions": [EmptyExtension, DummyExtension]},
@ -108,7 +108,7 @@ class TestExtensionsListCommand:
call_command("components", "ext", "list")
output = out.getvalue()
assert output.strip() == "name \n========\ncache \ndefaults\nview \nurl \nempty \ndummy"
assert output.strip() == "name \n========\ncache \ndefaults\nview \nempty \ndummy"
@djc_test(
components_settings={"extensions": [EmptyExtension, DummyExtension]},
@ -119,7 +119,7 @@ class TestExtensionsListCommand:
call_command("components", "ext", "list", "--all")
output = out.getvalue()
assert output.strip() == "name \n========\ncache \ndefaults\nview \nurl \nempty \ndummy"
assert output.strip() == "name \n========\ncache \ndefaults\nview \nempty \ndummy"
@djc_test(
components_settings={"extensions": [EmptyExtension, DummyExtension]},
@ -130,7 +130,7 @@ class TestExtensionsListCommand:
call_command("components", "ext", "list", "--columns", "name")
output = out.getvalue()
assert output.strip() == "name \n========\ncache \ndefaults\nview \nurl \nempty \ndummy"
assert output.strip() == "name \n========\ncache \ndefaults\nview \nempty \ndummy"
@djc_test(
components_settings={"extensions": [EmptyExtension, DummyExtension]},
@ -141,7 +141,7 @@ class TestExtensionsListCommand:
call_command("components", "ext", "list", "--simple")
output = out.getvalue()
assert output.strip() == "cache \ndefaults\nview \nurl \nempty \ndummy"
assert output.strip() == "cache \ndefaults\nview \nempty \ndummy"
@djc_test
@ -159,7 +159,7 @@ class TestExtensionsRunCommand:
output
== dedent(
f"""
usage: components ext run [-h] {{cache,defaults,view,url,empty,dummy}} ...
usage: components ext run [-h] {{cache,defaults,view,empty,dummy}} ...
Run a command added by an extension.
@ -167,11 +167,10 @@ class TestExtensionsRunCommand:
-h, --help show this help message and exit
subcommands:
{{cache,defaults,view,url,empty,dummy}}
{{cache,defaults,view,empty,dummy}}
cache Run commands added by the 'cache' extension.
defaults Run commands added by the 'defaults' extension.
view Run commands added by the 'view' extension.
url Run commands added by the 'url' extension.
empty Run commands added by the 'empty' extension.
dummy Run commands added by the 'dummy' extension.
"""