test: fix pylint warnings for FunctionalTestCase
This commit is contained in:
parent
3af8e8aaf2
commit
53817a9e32
1 changed files with 9 additions and 5 deletions
|
|
@ -179,13 +179,17 @@ class VersionWebTestCase(WebTestCase):
|
|||
@pytest.mark.functional
|
||||
class FunctionalTestCase(DataTestCase):
|
||||
"""
|
||||
Base class for test suites requiring a fully complete web app, to
|
||||
respond to functional tests.
|
||||
Base class for test suites requiring a fully complete web app, for
|
||||
sake of functional tests.
|
||||
|
||||
.. warning::
|
||||
|
||||
This class is very new and not yet mature; it will surely change.
|
||||
"""
|
||||
|
||||
wsgi_main_app = None
|
||||
|
||||
def make_config(self, **kwargs):
|
||||
def make_config(self, **kwargs): # pylint: disable=arguments-differ
|
||||
sqlite_path = self.write_file("test.sqlite", "")
|
||||
self.sqlite_engine_url = f"sqlite:///{sqlite_path}"
|
||||
|
||||
|
|
@ -203,14 +207,14 @@ version_locations = wuttjamaican.db:alembic/versions
|
|||
|
||||
return super().make_config([config_path], **kwargs)
|
||||
|
||||
def make_webtest(self):
|
||||
def make_webtest(self): # pylint: disable=missing-function-docstring
|
||||
webapp = appmod.make_wsgi_app(
|
||||
self.wsgi_main_app or appmod.main, config=self.config
|
||||
)
|
||||
|
||||
return TestApp(webapp)
|
||||
|
||||
def get_csrf_token(self, testapp):
|
||||
def get_csrf_token(self, testapp): # pylint: disable=missing-function-docstring
|
||||
res = testapp.get("/login")
|
||||
match = re.search(
|
||||
r'<input name="_csrf" type="hidden" value="(\w+)" />', res.text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue