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
6af4402a
Commit
6af4402a
authored
Jun 13, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Squash 3 more naive datetime warnings. I think the only ones left are in
migrations.
parent
d52329be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
common/djangoapps/student/tests/factories.py
+3
-2
lms/djangoapps/courseware/tests/test_views.py
+2
-1
No files found.
common/djangoapps/student/tests/factories.py
View file @
6af4402a
...
...
@@ -5,6 +5,7 @@ from django.contrib.auth.models import Group
from
datetime
import
datetime
from
factory
import
DjangoModelFactory
,
SubFactory
,
PostGenerationMethodCall
,
post_generation
,
Sequence
from
uuid
import
uuid4
from
pytz
import
UTC
# Factories don't have __init__ methods, and are self documenting
# pylint: disable=W0232
...
...
@@ -46,8 +47,8 @@ class UserFactory(DjangoModelFactory):
is_staff
=
False
is_active
=
True
is_superuser
=
False
last_login
=
datetime
(
2012
,
1
,
1
)
date_joined
=
datetime
(
2011
,
1
,
1
)
last_login
=
datetime
(
2012
,
1
,
1
,
tzinfo
=
UTC
)
date_joined
=
datetime
(
2011
,
1
,
1
,
tzinfo
=
UTC
)
@post_generation
def
profile
(
obj
,
create
,
extracted
,
**
kwargs
):
...
...
lms/djangoapps/courseware/tests/test_views.py
View file @
6af4402a
...
...
@@ -13,6 +13,7 @@ from xmodule.modulestore.django import modulestore
import
courseware.views
as
views
from
xmodule.modulestore
import
Location
from
pytz
import
UTC
class
Stub
():
...
...
@@ -63,7 +64,7 @@ class ViewsTestCase(TestCase):
def
setUp
(
self
):
self
.
user
=
User
.
objects
.
create
(
username
=
'dummy'
,
password
=
'123456'
,
email
=
'test@mit.edu'
)
self
.
date
=
datetime
.
datetime
(
2013
,
1
,
22
)
self
.
date
=
datetime
.
datetime
(
2013
,
1
,
22
,
tzinfo
=
UTC
)
self
.
course_id
=
'edX/toy/2012_Fall'
self
.
enrollment
=
CourseEnrollment
.
objects
.
get_or_create
(
user
=
self
.
user
,
course_id
=
self
.
course_id
,
...
...
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