feat: expose _class_hash as class_id (#1094)

* feat: expose _class_hash as class_id

* refactor: fix linting
This commit is contained in:
Juro Oravec 2025-04-07 11:08:02 +02:00 committed by GitHub
parent a49f5e51dd
commit bb5de86b69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 141 additions and 82 deletions

View file

@ -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)