mirror of
https://github.com/django-components/django-components.git
synced 2025-10-28 14:09:43 +00:00
feat: expose _class_hash as class_id (#1094)
* feat: expose _class_hash as class_id * refactor: fix linting
This commit is contained in:
parent
a49f5e51dd
commit
bb5de86b69
13 changed files with 141 additions and 82 deletions
|
|
@ -41,7 +41,7 @@ class TestComponentUrl:
|
|||
|
||||
# Check if the URL is correctly generated
|
||||
component_url = get_component_url(TestComponent)
|
||||
assert component_url == f"/components/ext/url/components/{TestComponent._class_hash}/"
|
||||
assert component_url == f"/components/ext/url/components/{TestComponent.class_id}/"
|
||||
|
||||
client = Client()
|
||||
response = client.get(component_url)
|
||||
|
|
@ -79,7 +79,7 @@ class TestComponentUrl:
|
|||
get_component_url(TestComponent)
|
||||
|
||||
# Even calling the URL directly should raise an error
|
||||
component_url = f"/components/ext/url/components/{TestComponent._class_hash}/"
|
||||
component_url = f"/components/ext/url/components/{TestComponent.class_id}/"
|
||||
|
||||
client = Client()
|
||||
response = client.get(component_url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue