Skip to content

Commit 25e5b9f

Browse files
committed
Replace hardcoded component in test with argument
The `inertia_page` method currently doesn't use the component that's given as an argument. This commit fixes that.
1 parent 5591683 commit 25e5b9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inertia/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ def assertComponentUsed(self, component_name):
5555

5656
def inertia_page(url, component='TestComponent', props={}, template_data={}):
5757
return {
58-
'component': 'TestComponent',
58+
'component': component,
5959
'props': props,
6060
'url': f'http://testserver/{url}/',
6161
'version': settings.INERTIA_VERSION,
6262
}
6363

6464
def inertia_div(*args, **kwargs):
6565
page = inertia_page(*args, **kwargs)
66-
return f'<div id="app" data-page="{escape(dumps(page))}"></div>'
66+
return f'<div id="app" data-page="{escape(dumps(page))}"></div>'

0 commit comments

Comments
 (0)