Skip to content

Commit

Permalink
Fix sorting errores
Browse files Browse the repository at this point in the history
  • Loading branch information
donob4n committed Jul 25, 2020
1 parent daa8722 commit 42ae96c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions qubesmanager/tests/test_qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,9 +1249,8 @@ def __check_sorting(self, column_name):
last_text = None
last_vm = None
for row in range(self.dialog.table.model().rowCount()):

vm = self._get_table_item(row, "Name")
text = self._get_table_item(row, column_name).lower()
text = self._get_table_item(row, column_name)

if row == 0:
self.assertEqual(vm, "dom0", "dom0 is not sorted first")
Expand All @@ -1261,11 +1260,11 @@ def __check_sorting(self, column_name):
else:
if last_text == text:
self.assertGreater(
vm, last_vm,
vm.lower(), last_vm.lower(),
"Incorrect sorting for {}".format(column_name))
else:
self.assertGreater(
text, last_text,
text.lower(), last_text.lower(),
"Incorrect sorting for {}".format(column_name))
last_text = text
last_vm = vm
Expand Down

0 comments on commit 42ae96c

Please sign in to comment.