forked from doableware/djongo
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
2,117 changed files
with
198,372 additions
and
1,696 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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
language: python | ||
|
||
python: | ||
- "3.6" | ||
|
||
install: | ||
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.0.tgz | ||
- tar xzf mongodb-linux-x86_64-4.0.0.tgz | ||
- ${PWD}/mongodb-linux-x86_64-4.0.0/bin/mongod --version | ||
- pip install tox | ||
|
||
before_script: | ||
- mkdir ${PWD}/mongodb-linux-x86_64-4.0.0/data | ||
- ${PWD}/mongodb-linux-x86_64-4.0.0/bin/mongod --dbpath ${PWD}/mongodb-linux-x86_64-4.0.0/data --logpath ${PWD}/mongodb-linux-x86_64-4.0.0/mongodb.log --fork | ||
|
||
script: | ||
- tox -e django_dev | ||
|
||
after_script: | ||
- pkill mongod |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from datetime import datetime | ||
|
||
from django.contrib.admin.options import IncorrectLookupParameters | ||
from django.contrib.auth.models import User | ||
from django.test import RequestFactory, TestCase | ||
from django.utils.timezone import make_aware | ||
|
||
|
@@ -11,9 +12,14 @@ | |
class DateHierarchyTests(TestCase): | ||
factory = RequestFactory() | ||
|
||
@classmethod | ||
def setUpTestData(cls): | ||
cls.superuser = User.objects.create_superuser(username='super', email='[email protected]', password='xxx') | ||
|
||
def assertDateParams(self, query, expected_from_date, expected_to_date): | ||
query = {'date__%s' % field: val for field, val in query.items()} | ||
request = self.factory.get('/', query) | ||
request.user = self.superuser | ||
changelist = EventAdmin(Event, custom_site).get_changelist_instance(request) | ||
_, _, lookup_params, _ = changelist.get_filters(request) | ||
self.assertEqual(lookup_params['date__gte'], expected_from_date) | ||
|
Oops, something went wrong.