summaryrefslogtreecommitdiff
path: root/tests/sitemaps_tests
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2019-02-05 11:22:08 +0000
committerTim Graham <timograham@gmail.com>2019-02-06 13:48:39 -0500
commit24b82cd201e21060fbc02117dc16d1702877a1f3 (patch)
tree7d36db9251700d0abf8fbf69399c8abc7fd9026a /tests/sitemaps_tests
parent21bb71ef0dcb86798edb0d8b21138bcc4b947590 (diff)
downloaddjango-24b82cd201e21060fbc02117dc16d1702877a1f3.tar.gz
Fixed #30159 -- Removed unneeded use of OrderedDict.
Dicts preserve order since Python 3.6.
Diffstat (limited to 'tests/sitemaps_tests')
-rw-r--r--tests/sitemaps_tests/urls/http.py43
1 files changed, 21 insertions, 22 deletions
diff --git a/tests/sitemaps_tests/urls/http.py b/tests/sitemaps_tests/urls/http.py
index 03652902fb..495f60fb1a 100644
--- a/tests/sitemaps_tests/urls/http.py
+++ b/tests/sitemaps_tests/urls/http.py
@@ -1,4 +1,3 @@
-from collections import OrderedDict
from datetime import date, datetime
from django.conf.urls.i18n import i18n_patterns
@@ -102,27 +101,27 @@ fixed_lastmod__mixed_sitemaps = {
'fixed-lastmod-mixed': FixedLastmodMixedSitemap,
}
-sitemaps_lastmod_mixed_ascending = OrderedDict([
- ('no-lastmod', EmptySitemap),
- ('lastmod', FixedLastmodSitemap),
-])
-
-sitemaps_lastmod_mixed_descending = OrderedDict([
- ('lastmod', FixedLastmodSitemap),
- ('no-lastmod', EmptySitemap),
-])
-
-sitemaps_lastmod_ascending = OrderedDict([
- ('date', DateSiteMap),
- ('datetime', FixedLastmodSitemap),
- ('datetime-newer', FixedNewerLastmodSitemap),
-])
-
-sitemaps_lastmod_descending = OrderedDict([
- ('datetime-newer', FixedNewerLastmodSitemap),
- ('datetime', FixedLastmodSitemap),
- ('date', DateSiteMap),
-])
+sitemaps_lastmod_mixed_ascending = {
+ 'no-lastmod': EmptySitemap,
+ 'lastmod': FixedLastmodSitemap,
+}
+
+sitemaps_lastmod_mixed_descending = {
+ 'lastmod': FixedLastmodSitemap,
+ 'no-lastmod': EmptySitemap,
+}
+
+sitemaps_lastmod_ascending = {
+ 'date': DateSiteMap,
+ 'datetime': FixedLastmodSitemap,
+ 'datetime-newer': FixedNewerLastmodSitemap,
+}
+
+sitemaps_lastmod_descending = {
+ 'datetime-newer': FixedNewerLastmodSitemap,
+ 'datetime': FixedLastmodSitemap,
+ 'date': DateSiteMap,
+}
generic_sitemaps = {
'generic': GenericSitemap({'queryset': TestModel.objects.order_by('pk').all()}),