forked from rafalp/Misago
-
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.
Merge pull request rafalp#1117 from rafalp/master
Release Misago 0.19.3
- Loading branch information
Showing
12 changed files
with
39 additions
and
23 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
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 +1 @@ | ||
__version__ = '0.19.2' | ||
__version__ = '0.19.3' |
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
Binary file not shown.
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
Binary file not shown.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,4 +1,7 @@ | ||
from datetime import timedelta | ||
|
||
from django.contrib.auth import get_user_model | ||
from django.utils import timezone | ||
|
||
from misago.categories.models import Category | ||
from misago.core import threadstore | ||
|
@@ -35,9 +38,21 @@ def test_get_active_posters_ranking(self): | |
self.assertEqual(empty_ranking['users'], []) | ||
self.assertEqual(empty_ranking['users_count'], 0) | ||
|
||
# other user | ||
# other user that will be posting | ||
other_user = UserModel.objects.create_user("OtherUser", "[email protected]", "pass123") | ||
|
||
# lurker user that won't post anything | ||
UserModel.objects.create_user("Lurker", "[email protected]", "pass123") | ||
|
||
# unranked user that posted something 400 days ago | ||
unranked_user = UserModel.objects.create_user( | ||
"UnrankedUser", "[email protected]", "pass123" | ||
) | ||
|
||
started_on = timezone.now() - timedelta(days=400) | ||
post_thread(self.category, poster=unranked_user, started_on=started_on) | ||
|
||
# Start testing scenarios | ||
post_thread(self.category, poster=other_user) | ||
|
||
build_active_posters_ranking() | ||
|