LocalStorage
1from selenium.webdriver.remote.webdriver import WebDriver
2
3class LocalStorage(): 4 # from https://stackoverflow.com/a/46361900
5 def __init__(self, driver: WebDriver):
6 self.driver = driver
TestPosting
9from ..util import qr
10from ..util.manage import staff_login
11
12class TestPosting(SeleniumTestCase): 13 def test_qr(self):
14 self.options.goto_page(self.options.board)
15 elem = self.driver.find_element(by=By.ID, value="board-subtitle")
TestManageActions
11from ..util.manage import staff_login
12
13
14class TestManageActions(SeleniumTestCase): 15 def setUp(self) -> None:
16 staff_login(self.options)
17 return super().setUp()
SeleniumTestCase
5
6options: TestingOptions = None
7
8class SeleniumTestCase(unittest.TestCase): 9 @staticmethod
10 def add(suite: unittest.TestSuite, use_options: TestingOptions, test_class: Type[unittest.TestCase]):
11 global options
TestingOptions
19default_staff_username = "admin"
20default_staff_password = "password"
21
22class TestingOptions:23 browser: str
24 driver: WebDriver
25 headless: bool
Class docstring is missing.
If you want to ignore this, you can configure this in the .deepsource.toml
file. Please refer to docs for available options.