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
97f5fe03
Commit
97f5fe03
authored
Sep 06, 2017
by
Jeremy Bowman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for pytest database usage
parent
cebf6d3e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
3 deletions
+10
-3
cms/djangoapps/contentstore/tests/test_courseware_index.py
+2
-0
common/djangoapps/static_replace/test/test_static_replace.py
+2
-0
lms/djangoapps/instructor/tests/test_tools.py
+2
-1
openedx/core/djangoapps/user_api/tests/test_partition_schemes.py
+3
-0
openedx/core/lib/tests/test_time_zone_utils.py
+1
-2
No files found.
cms/djangoapps/contentstore/tests/test_courseware_index.py
View file @
97f5fe03
...
...
@@ -8,6 +8,7 @@ from unittest import skip
from
uuid
import
uuid4
import
ddt
import
pytest
from
dateutil.tz
import
tzutc
from
django.conf
import
settings
from
lazy.lazy
import
lazy
...
...
@@ -181,6 +182,7 @@ class MixedWithOptionsTestCase(MixedSplitTestCase):
store
.
update_item
(
item
,
ModuleStoreEnum
.
UserID
.
test
)
@pytest.mark.django_db
@ddt.ddt
class
TestCoursewareSearchIndexer
(
MixedWithOptionsTestCase
):
""" Tests the operation of the CoursewareSearchIndexer """
...
...
common/djangoapps/static_replace/test/test_static_replace.py
View file @
97f5fe03
...
...
@@ -6,6 +6,7 @@ from cStringIO import StringIO
from
urlparse
import
parse_qsl
,
urlparse
,
urlunparse
import
ddt
import
pytest
from
django.test
import
override_settings
from
django.utils.http
import
urlencode
,
urlquote
from
mock
import
Mock
,
patch
...
...
@@ -162,6 +163,7 @@ def test_raw_static_check():
assert_equals
(
path
,
replace_static_urls
(
path
,
text
))
@pytest.mark.django_db
@patch
(
'static_replace.staticfiles_storage'
,
autospec
=
True
)
@patch
(
'static_replace.modulestore'
,
autospec
=
True
)
def
test_static_url_with_query
(
mock_modulestore
,
mock_storage
):
...
...
lms/djangoapps/instructor/tests/test_tools.py
View file @
97f5fe03
...
...
@@ -7,6 +7,7 @@ import json
import
unittest
import
mock
from
django.test
import
TestCase
from
django.test.utils
import
override_settings
from
django.utils.timezone
import
utc
from
nose.plugins.attrib
import
attr
...
...
@@ -65,7 +66,7 @@ class TestHandleDashboardError(unittest.TestCase):
@attr
(
shard
=
1
)
class
TestRequireStudentIdentifier
(
unittest
.
TestCase
):
class
TestRequireStudentIdentifier
(
TestCase
):
"""
Test require_student_from_identifier()
"""
...
...
openedx/core/djangoapps/user_api/tests/test_partition_schemes.py
View file @
97f5fe03
...
...
@@ -2,6 +2,8 @@
Test the user api's partition extensions.
"""
from
collections
import
defaultdict
import
pytest
from
django.test
import
TestCase
from
mock
import
patch
...
...
@@ -32,6 +34,7 @@ class MemoryCourseTagAPI(object):
return
False
@pytest.mark.django_db
class
TestRandomUserPartitionScheme
(
PartitionTestCase
):
"""
Test getting a user's group out of a partition
...
...
openedx/core/lib/tests/test_time_zone_utils.py
View file @
97f5fe03
"""Tests covering time zone utilities."""
from
unittest
import
TestCase
from
django.test
import
TestCase
from
freezegun
import
freeze_time
from
pytz
import
timezone
,
utc
...
...
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