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
bed5d3e8
Commit
bed5d3e8
authored
Nov 22, 2015
by
Ben Patterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary files, use generic file for unrelated test.
parent
484a4f2b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
27 deletions
+20
-27
common/test/acceptance/tests/discussion/test_cohort_management.py
+12
-13
common/test/acceptance/tests/lms/test_learner_profile.py
+1
-1
common/test/data/uploads/cohort_users_both_columns.csv
+0
-4
common/test/data/uploads/cohort_users_only_email.csv
+0
-5
common/test/data/uploads/cohort_users_only_username.csv
+0
-4
common/test/data/uploads/generic_csv.csv
+7
-0
No files found.
common/test/acceptance/tests/discussion/test_cohort_management.py
View file @
bed5d3e8
...
...
@@ -5,7 +5,6 @@ End-to-end tests related to the cohort management on the LMS Instructor Dashboar
from
datetime
import
datetime
from
path
import
path
from
pytz
import
UTC
,
utc
from
bok_choy.promise
import
EmptyPromise
from
nose.plugins.attrib
import
attr
...
...
@@ -71,11 +70,6 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
self
.
instructor_dashboard_page
.
visit
()
self
.
cohort_management_page
=
self
.
instructor_dashboard_page
.
select_cohort_management
()
test_dir
=
path
(
__file__
)
.
abspath
()
.
dirname
()
.
dirname
()
.
dirname
()
.
dirname
()
self
.
files_path
=
test_dir
+
'/data/uploads/'
test_dir2
=
self
.
instructor_dashboard_page
.
get_asset_path
(
'.'
)
def
verify_cohort_description
(
self
,
cohort_name
,
expected_description
):
"""
Selects the cohort with the given name and verifies the expected description is presented.
...
...
@@ -323,9 +317,14 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
)
def
_create_csv_file
(
self
,
filename
,
csv_text_as_lists
):
import
csv
"""
Create a csv file with the provided list of lists.
:param filename: this is the name that will be used for the csv file. Its location will
be under the test upload data directory
:param csv_text_as_lists: provide the contents of the csv file int he form of a list of lists
"""
filename
=
self
.
instructor_dashboard_page
.
get_asset_path
(
filename
)
# filename = self.files_path + filename
with
open
(
filename
,
'w+'
)
as
csv_file
:
writer
=
csv
.
writer
(
csv_file
,
quoting
=
csv
.
QUOTE_ALL
)
for
line
in
csv_text_as_lists
:
...
...
@@ -494,10 +493,10 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
And appropriate events have been emitted
"""
csv_contents
=
[
[
'username'
,
'email'
,
'ignored_column'
,
'cohort'
],
[
self
.
instructor_name
,
''
,
'June'
,
'ManualCohort1'
],
[
''
,
self
.
student_email
,
'Spring'
,
'AutoCohort1'
],
[
self
.
other_student_name
,
''
,
'Fall'
,
'ManualCohort1'
],
[
'username'
,
'email'
,
'ignored_column'
,
'cohort'
],
[
self
.
instructor_name
,
''
,
'June'
,
'ManualCohort1'
],
[
''
,
self
.
student_email
,
'Spring'
,
'AutoCohort1'
],
[
self
.
other_student_name
,
''
,
'Fall'
,
'ManualCohort1'
],
]
filename
=
"cohort_csv_both_columns_1.csv"
self
.
_create_csv_file
(
filename
,
csv_contents
)
...
...
@@ -536,7 +535,7 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
"""
csv_contents
=
[
[
'username'
,
'cohort'
],
[
self
.
instructor_name
,
'ManualCohort1'
],
[
self
.
instructor_name
,
'ManualCohort1'
],
[
self
.
student_name
,
'AutoCohort1'
],
[
self
.
other_student_name
,
'ManualCohort1'
],
]
...
...
common/test/acceptance/tests/lms/test_learner_profile.py
View file @
bed5d3e8
...
...
@@ -604,7 +604,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
self
.
assert_default_image_has_public_access
(
profile_page
)
profile_page
.
upload_file
(
filename
=
'
cohort_users_only_username
.csv'
)
profile_page
.
upload_file
(
filename
=
'
generic_csv
.csv'
)
self
.
assertEqual
(
profile_page
.
profile_image_message
,
"The file must be one of the following types: .gif, .png, .jpeg, .jpg."
...
...
common/test/data/uploads/cohort_users_both_columns.csv
deleted
100644 → 0
View file @
484a4f2b
username,email,ignored_column,cohort
instructor_user,,June,ManualCohort1
,student_user@example.com,Spring,AutoCohort1
other_student_user,,Fall,ManualCohort1
common/test/data/uploads/cohort_users_only_email.csv
deleted
100644 → 0
View file @
484a4f2b
email,cohort
instructor_user@example.com,ManualCohort1
student_user@example.com,AutoCohort1
other_student_user@example.com,ManualCohort1
common/test/data/uploads/cohort_users_only_username.csv
deleted
100644 → 0
View file @
484a4f2b
username,cohort
instructor_user,ManualCohort1
student_user,AutoCohort1
other_student_user,ManualCohort1
common/test/data/uploads/generic_csv.csv
0 → 100644
View file @
bed5d3e8
column_1,column_2
foo,bar
foo,baz
hello,there
file_size,must_be_100_bytes
the story,was
very very very very very,interesting
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