Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
0595459c
Commit
0595459c
authored
Aug 09, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert back to old way of logging someone else in
parent
8feaa0ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
cms/djangoapps/contentstore/features/course-team.py
+18
-3
No files found.
cms/djangoapps/contentstore/features/course-team.py
View file @
0595459c
...
...
@@ -2,9 +2,10 @@
#pylint: disable=W0621
from
lettuce
import
world
,
step
from
common
import
create_studio_user
,
log_into_studio
from
common
import
create_studio_user
from
django.contrib.auth.models
import
Group
from
auth.authz
import
get_course_groupname_for_role
from
auth.authz
import
get_course_groupname_for_role
,
get_user_by_email
from
nose.tools
import
assert_true
PASSWORD
=
'test'
EMAIL_EXTENSION
=
'@edx.org'
...
...
@@ -90,7 +91,21 @@ def remove_course_team_admin(_step, outer_capture, name):
@step
(
u'"([^"]*)" logs in$'
)
def
other_user_login
(
_step
,
name
):
log_into_studio
(
uname
=
name
,
password
=
PASSWORD
,
email
=
name
+
EMAIL_EXTENSION
,
name
=
name
)
world
.
browser
.
cookies
.
delete
()
world
.
visit
(
'/'
)
signin_css
=
'a.action-signin'
world
.
is_css_present
(
signin_css
)
world
.
css_click
(
signin_css
)
def
fill_login_form
():
login_form
=
world
.
browser
.
find_by_css
(
'form#login_form'
)
login_form
.
find_by_name
(
'email'
)
.
fill
(
name
+
EMAIL_EXTENSION
)
login_form
.
find_by_name
(
'password'
)
.
fill
(
PASSWORD
)
login_form
.
find_by_name
(
'submit'
)
.
click
()
world
.
retry_on_exception
(
fill_login_form
)
assert_true
(
world
.
is_css_present
(
'.new-course-button'
))
world
.
scenario_dict
[
'USER'
]
=
get_user_by_email
(
name
+
EMAIL_EXTENSION
)
@step
(
u'I( do not)? see the course on my page'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment