Skip to content

Commit

Permalink
more aync test refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Dec 19, 2022
1 parent 319f44e commit 2db41e0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions tests/test_aggrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ class TestAgGrid(BaseSeleniumTest):
testing AgGrid integration
"""

async def setUp(self, **kwargs):
async def asyncSetUp(self, **kwargs):
"""
setup test environment
"""
await super().setUp(port=8124, **kwargs)
await super().asyncSetUp(port=8124, **kwargs)
self.data = [
{"name": "Bob", "age": 42, "birthdate": datetime.date(year=2000, month=1, day=1)},
{"name": "Alice", "age": 24, "birthdate": datetime.date(year=2022, month=1, day=1)},
]

async def tearDown(self):
async def asyncTearDown(self):
"""
close test environment
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ajax.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class TestAjaxWithSelenium(BaseSeleniumTest):
testing ajax (non-websocket) behavior
"""

async def setUp(self):
await super().setUp(port=8126)
async def asyncSetUp(self):
await super().asyncSetUp(port=8126)

async def testAjax(self):
"""
Expand Down
6 changes: 3 additions & 3 deletions tests/test_issue150.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class TestIssue150(BaseSeleniumTest):
https://github.com/justpy-org/justpy/issues/150
"""

async def setUp(self):
await BaseSeleniumTest.setUp(self,port=8124)
async def asyncSetUp(self):
await BaseSeleniumTest.asyncSetUp(self,port=8124)

async def tearDown(self):
async def asyncTearDown(self):
self.browser.close()
await asyncio.sleep(self.server.sleep_time)
await self.server.stop()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_issue304.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TestIssue304(BaseSeleniumTest):
https://github.com/justpy-org/justpy/issues/304
"""

async def tearDown(self):
async def asyncTearDown(self):
"""
close selenium browser and stop server
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_with_selenium_clickdemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class TestClickDemoWithSelenium(BaseSeleniumTest):
testing actual browser behavior with selenium
"""

async def setUp(self):
await BaseSeleniumTest.setUp(self,port=8124)
async def asyncSetUp(self):
await BaseSeleniumTest.asyncSetUp(self,port=8124)

async def onDivClick(self, msg):
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_with_selenium_issue279.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class TestIssue279WithSelenium(BaseSeleniumTest):
testing actual browser behavior with selenium
"""

async def setUp(self):
await super().setUp(port=8125)
async def asyncSetUp(self):
await super().asyncSetUp(port=8125)

async def testIssue279(self):
"""
Expand Down

0 comments on commit 2db41e0

Please sign in to comment.