Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Anthony
memopol
Commits
45484bb6
Commit
45484bb6
authored
Oct 05, 2016
by
Nicolas Joyard
Browse files
Fix unreliable order options tests
parent
e3f72473
Changes
4
Show whitespace changes
Inline
Side-by-side
src/memopol/tests/response_fixtures/RepresentativeListTest.test_navbar_order_options.content
View file @
45484bb6
...
...
@@ -7,9 +7,9 @@
</li>
---
<li>
<a href="?&sort=score-
de
sc">
Wor
st score</a>
<a href="?&sort=score-
a
sc">
Be
st score</a>
</li>
---
<li>
<a href="?&sort=score-
a
sc">
Be
st score</a>
<a href="?&sort=score-
de
sc">
Wor
st score</a>
</li>
\ No newline at end of file
src/memopol/tests/response_fixtures/ThemeListTest.test_navbar_order_options.content
View file @
45484bb6
<li>
<a href="?&sort=name-desc">Name Z-A</a>
</li>
---
<li class="disabled">
<a href="?&sort=name-asc">Name A-Z</a>
</li>
---
<li>
<a href="?&sort=name-desc">Name Z-A</a>
</li>
\ No newline at end of file
src/memopol/views/representative_list.py
View file @
45484bb6
...
...
@@ -37,7 +37,7 @@ class RepresentativeList(CSVDownloadMixin, GridListMixin, PaginationMixin,
'fields'
:
[
'-representative_score__score'
]
},
'score-desc'
:
{
'order'
:
2
,
'order'
:
3
,
'label'
:
'Worst score'
,
'fields'
:
[
'representative_score__score'
]
}
...
...
src/memopol/views/theme_list.py
View file @
45484bb6
...
...
@@ -30,7 +30,7 @@ class ThemeList(PaginationMixin, SortMixin, PositionFormMixin,
'fields'
:
[
'name'
]
},
'name-desc'
:
{
'order'
:
0
,
'order'
:
1
,
'label'
:
'Name Z-A'
,
'fields'
:
[
'-name'
]
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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