forked from mmmaly/chcemvediet
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf88a97
commit c1ee27a
Showing
12 changed files
with
19 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +0,0 @@ | ||
# vim: expandtab | ||
# -*- coding: utf-8 -*- | ||
from django.test import TestCase | ||
from django.test.utils import override_settings | ||
|
||
|
||
class AccountsTestCaseMixin(TestCase): | ||
|
||
def _pre_setup(self): | ||
super(AccountsTestCaseMixin, self)._pre_setup() | ||
self.settings_override = override_settings( | ||
PASSWORD_HASHERS=(u'django.contrib.auth.hashers.MD5PasswordHasher',), | ||
) | ||
self.settings_override.enable() | ||
|
||
def _post_teardown(self): | ||
self.settings_override.disable() | ||
super(AccountsTestCaseMixin, self)._post_teardown() | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
from django.http import HttpResponse | ||
from django.contrib.auth.models import User | ||
from django.test import TestCase | ||
from django.test.utils import override_settings | ||
|
||
from poleno.utils.urls import reverse | ||
|
||
|
@@ -21,20 +20,12 @@ class TimewarpAdminTest(TestCase): | |
def setUp(self): | ||
timewarp.enable() | ||
timewarp.reset() | ||
|
||
self.settings_override = override_settings( | ||
PASSWORD_HASHERS=(u'django.contrib.auth.hashers.MD5PasswordHasher',), | ||
) | ||
self.settings_override.enable() | ||
|
||
self.admin = User.objects.create_superuser(username=u'admin', email=u'[email protected]', password=u'top_secret') | ||
self.client.login(username=u'admin', password=u'top_secret') | ||
|
||
def tearDown(self): | ||
timewarp.reset() | ||
|
||
self.settings_override.disable() | ||
|
||
|
||
def _parse_dt(self, value): | ||
dt = datetime.datetime.strptime(value, u'%Y-%m-%d %H:%M:%S') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters