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
e7b386c4
Commit
e7b386c4
authored
Nov 22, 2013
by
Jason Bau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes a branding test which was passing for a trivial (wrong) reason
parent
90bbb7b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lms/djangoapps/branding/tests.py
+7
-2
No files found.
lms/djangoapps/branding/tests.py
View file @
e7b386c4
...
...
@@ -5,7 +5,7 @@ import datetime
from
pytz
import
UTC
from
django.conf
import
settings
from
django.test.utils
import
override_settings
from
django.test.client
import
RequestFactory
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.django
import
editable_modulestore
from
xmodule.modulestore.tests.factories
import
CourseFactory
...
...
@@ -25,6 +25,7 @@ class AnonymousIndexPageTest(ModuleStoreTestCase):
"""
def
setUp
(
self
):
self
.
store
=
editable_modulestore
()
self
.
factory
=
RequestFactory
()
self
.
course
=
CourseFactory
.
create
()
self
.
course
.
days_early_for_beta
=
5
self
.
course
.
enrollment_start
=
datetime
.
datetime
.
now
(
UTC
)
+
datetime
.
timedelta
(
days
=
3
)
...
...
@@ -32,7 +33,11 @@ class AnonymousIndexPageTest(ModuleStoreTestCase):
@override_settings
(
MITX_FEATURES
=
MITX_FEATURES_WITH_STARTDATE
)
def
test_none_user_index_access_with_startdate_fails
(
self
):
with
self
.
assertRaises
(
Exception
):
"""
This was a "before" test for a bugfix. If someone fixes the bug another way in the future
and this test begins failing (but the other two pass), then feel free to delete this test.
"""
with
self
.
assertRaisesRegexp
(
AttributeError
,
"'NoneType' object has no attribute 'is_authenticated'"
):
student
.
views
.
index
(
self
.
factory
.
get
(
'/'
),
user
=
None
)
# pylint: disable=E1101
@override_settings
(
MITX_FEATURES
=
MITX_FEATURES_WITH_STARTDATE
)
...
...
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