Create app with multiple dynamic route vars with the same name. Args: index_page: The index page. token: a Token. app_module_mock: Mocked app module. mocker: pytest mocker object.
(
index_page: ComponentCallable,
token: str,
app_module_mock: unittest.mock.Mock,
mocker: MockerFixture,
)
| 1789 | |
| 1790 | |
| 1791 | def test_multiple_dynamic_args( |
| 1792 | index_page: ComponentCallable, |
| 1793 | token: str, |
| 1794 | app_module_mock: unittest.mock.Mock, |
| 1795 | mocker: MockerFixture, |
| 1796 | ): |
| 1797 | """Create app with multiple dynamic route vars with the same name. |
| 1798 | |
| 1799 | Args: |
| 1800 | index_page: The index page. |
| 1801 | token: a Token. |
| 1802 | app_module_mock: Mocked app module. |
| 1803 | mocker: pytest mocker object. |
| 1804 | """ |
| 1805 | arg_name = "my_arg" |
| 1806 | route = f"/test/[{arg_name}]" |
| 1807 | route2 = f"/test2/[{arg_name}]" |
| 1808 | app = app_module_mock.app = App(_state=EmptyState) |
| 1809 | app.add_page(index_page, route=route) |
| 1810 | app.add_page(index_page, route=route2) |
| 1811 | |
| 1812 | |
| 1813 | @pytest.fixture |