Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
persona
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Hexang 息壤平台
persona
Commits
17f054c1
Commit
17f054c1
authored
12 years ago
by
Leah Klearman
Browse files
Options
Downloads
Patches
Plain Diff
replace command line flag with server detecting code
parent
eb158dd7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
automation-tests/123done/conftest.py
+0
-25
0 additions, 25 deletions
automation-tests/123done/conftest.py
automation-tests/123done/tests/test_change_password.py
+11
-1
11 additions, 1 deletion
automation-tests/123done/tests/test_change_password.py
with
11 additions
and
26 deletions
automation-tests/123done/conftest.py
deleted
100644 → 0
+
0
−
25
View file @
eb158dd7
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import
py
def
pytest_runtest_setup
(
item
):
pytest_mozwebqa
=
py
.
test
.
config
.
pluginmanager
.
getplugin
(
"
mozwebqa
"
)
pytest_mozwebqa
.
TestSetup
.
server_base_url
=
item
.
config
.
option
.
server_base_url
def
pytest_addoption
(
parser
):
parser
.
addoption
(
"
--serverbaseurl
"
,
action
=
"
store
"
,
dest
=
'
server_base_url
'
,
metavar
=
'
str
'
,
default
=
"
https://login.dev.anosrep.org
"
,
help
=
"
specify the server base url
"
)
def
pytest_funcarg__mozwebqa
(
request
):
pytest_mozwebqa
=
py
.
test
.
config
.
pluginmanager
.
getplugin
(
"
mozwebqa
"
)
return
pytest_mozwebqa
.
TestSetup
(
request
)
This diff is collapsed.
Click to expand it.
automation-tests/123done/tests/test_change_password.py
+
11
−
1
View file @
17f054c1
...
...
@@ -14,6 +14,16 @@ import pytest
class
TestChangePassword
:
def
_persona_server_url
(
self
,
mozwebqa
):
server
=
None
if
'
dev
'
in
mozwebqa
.
base_url
:
server
=
'
https://login.dev.anosrep.org
'
elif
'
beta
'
in
mozwebqa
.
base_url
:
server
=
'
https://login.anosrep.org
'
else
:
server
=
'
https://login.persona.org
'
return
server
def
test_can_change_user_password
(
self
,
mozwebqa
):
user
=
MockUser
()
home_pg
=
HomePage
(
mozwebqa
)
...
...
@@ -30,7 +40,7 @@ class TestChangePassword:
from
browserid.pages.complete_registration
import
CompleteRegistration
CompleteRegistration
(
mozwebqa
.
selenium
,
mozwebqa
.
timeout
,
email
.
verify_user_link
)
mozwebqa
.
selenium
.
get
(
mozwebqa
.
server_base_url
)
mozwebqa
.
selenium
.
get
(
self
.
_persona_server_url
(
mozwebqa
)
)
from
browserid.pages.account_manager
import
AccountManager
account_manager
=
AccountManager
(
mozwebqa
.
selenium
,
mozwebqa
.
timeout
)
...
...
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