Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
97e90636
Verified
Commit
97e90636
authored
5 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
[CI] Move Selenium test config out of class
Very bad design in Django code...
parent
9dca20c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
biscuit/core/tests/browser/test_selenium.py
+4
-6
4 additions, 6 deletions
biscuit/core/tests/browser/test_selenium.py
tox.ini
+1
-2
1 addition, 2 deletions
tox.ini
with
5 additions
and
8 deletions
biscuit/core/tests/browser/test_selenium.py
+
4
−
6
View file @
97e90636
...
...
@@ -2,15 +2,13 @@ import os
import
pytest
from
django.test.selenium
import
SeleniumTestCase
from
django.test.selenium
import
SeleniumTestCase
,
SeleniumTestCaseBase
SeleniumTestCaseBase
.
external_host
=
os
.
environ
.
get
(
'
TEST_HOST
'
,
''
)
or
None
SeleniumTestCaseBase
.
browsers
=
list
(
filter
(
bool
,
os
.
environ
.
get
(
'
TEST_SELENIUM_BROWSERS
'
,
''
).
split
(
'
,
'
)))
SeleniumTestCaseBase
.
selenium_hub
=
os
.
environ
.
get
(
'
TEST_SELENIUM_HUB
'
,
''
)
or
None
class
SeleniumTests
(
SeleniumTestCase
):
host
=
os
.
environ
.
get
(
'
TEST_LISTEN_ADDRESS
'
,
''
)
or
'
127.0.0.1
'
external_host
=
os
.
environ
.
get
(
'
TEST_HOST
'
,
''
)
or
None
browsers
=
list
(
filter
(
bool
,
os
.
environ
.
get
(
'
TEST_SELENIUM_BROWSERS
'
,
''
).
split
(
'
,
'
)))
selenium_hub
=
'
http://%s/wd/hub
'
%
os
.
environ
.
get
(
'
TEST_SELENIUM_HUB
'
,
''
)
or
'
127.0.0.1:4444
'
@classmethod
def
_screenshot
(
cls
,
filename
):
screenshot_path
=
os
.
environ
.
get
(
'
TEST_SCREENSHOT_PATH
'
,
None
)
...
...
This diff is collapsed.
Click to expand it.
tox.ini
+
1
−
2
View file @
97e90636
...
...
@@ -9,9 +9,8 @@ skip_install = true
commands
=
pytest --pylama --cov=biscuit biscuit/core/
setenv
=
TEST_SCREENSHOT_PATH
=
{env:TEST_SCREENSHOT_PATH:}
TEST_SELENIUM_HUB
=
{env:TEST_SELENIUM_HUB:
127.0.0.1:4444
}
TEST_SELENIUM_HUB
=
{env:TEST_SELENIUM_HUB:}
TEST_SELENIUM_BROWSERS
=
{env:TEST_SELENIUM_BROWSERS:}
TEST_LISTEN_ADDRESS
=
{env:TEST_LISTEN_ADDRESS:127.0.0.1}
TEST_HOST
=
{env:TEST_HOST:}
[pylama]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment