Przeglądaj źródła

Both server and client paging support is_truncated, so remove unneeded code

Nuwan Goonasekera 7 lat temu
rodzic
commit
5ece31d590
1 zmienionych plików z 4 dodań i 7 usunięć
  1. 4 7
      test/helpers/standard_interface_tests.py

+ 4 - 7
test/helpers/standard_interface_tests.py

@@ -49,13 +49,10 @@ def check_obj_properties(test, obj):
 def check_list(test, service, obj):
     list_objs = service.list()
     test.assertIsInstance(list_objs, ResultList)
-    if list_objs.supports_server_paging:
-        all_records = list_objs
-        while list_objs.is_truncated:
-            list_objs = service.list(marker=list_objs.marker)
-            all_records += list_objs
-    else:
-        all_records = list_objs.data
+    all_records = list_objs
+    while list_objs.is_truncated:
+        list_objs = service.list(marker=list_objs.marker)
+        all_records += list_objs
     match_objs = [o for o in all_records if o.id == obj.id]
     test.assertTrue(
         len(match_objs) == 1,