test_empty_collection (test_orders.OrderContract.test_empty_collection) ... ok
test_equal_timestamps_keep_input_order (test_orders.OrderContract.test_equal_timestamps_keep_input_order) ... FAIL
test_filter_before_paging (test_orders.OrderContract.test_filter_before_paging) ... FAIL
test_first_page (test_orders.OrderContract.test_first_page) ... FAIL
test_invalid_page_rejected (test_orders.OrderContract.test_invalid_page_rejected) ... ok
test_invalid_page_size_rejected_at_public_entry (test_orders.OrderContract.test_invalid_page_size_rejected_at_public_entry) ... ok
test_invalid_status_rejected (test_orders.OrderContract.test_invalid_status_rejected) ... ok
test_out_of_range_page_keeps_total (test_orders.OrderContract.test_out_of_range_page_keeps_total) ... FAIL
test_query_does_not_mutate_input (test_orders.OrderContract.test_query_does_not_mutate_input) ... FAIL
test_second_page (test_orders.OrderContract.test_second_page) ... FAIL
test_total_counts_all_matching_orders (test_orders.OrderContract.test_total_counts_all_matching_orders) ... FAIL

======================================================================
FAIL: test_equal_timestamps_keep_input_order (test_orders.OrderContract.test_equal_timestamps_keep_input_order)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private./test_orders.py", line 65, in test_equal_timestamps_keep_input_order
    self.assertEqual([r["id"] for r in list_orders(rows, page_size=100)["items"]], ["X", "Y"])
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: [] != ['X', 'Y']

Second list contains 2 additional elements.
First extra element 0:
'X'

- []
+ ['X', 'Y']

======================================================================
FAIL: test_filter_before_paging (test_orders.OrderContract.test_filter_before_paging)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private./test_orders.py", line 38, in test_filter_before_paging
    self.assertEqual([r["id"] for r in result["items"]], ["D", "C"])
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: ['A'] != ['D', 'C']

First differing element 0:
'A'
'D'

Second list contains 1 additional elements.
First extra element 1:
'C'

- ['A']
+ ['D', 'C']

======================================================================
FAIL: test_first_page (test_orders.OrderContract.test_first_page)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private./test_orders.py", line 20, in test_first_page
    self.assertEqual([r["id"] for r in list_orders(fixture())["items"]], ["E", "D"])
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: ['B', 'C'] != ['E', 'D']

First differing element 0:
'B'
'E'

- ['B', 'C']
?   ^    ^

+ ['E', 'D']
?   ^    ^


======================================================================
FAIL: test_out_of_range_page_keeps_total (test_orders.OrderContract.test_out_of_range_page_keeps_total)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private./test_orders.py", line 43, in test_out_of_range_page_keeps_total
    self.assertEqual(result, {"items": [], "total": 5, "pages": 3})
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {'items': [], 'total': 0, 'pages': 0} != {'items': [], 'total': 5, 'pages': 3}
- {'items': [], 'pages': 0, 'total': 0}
?                        ^           ^

+ {'items': [], 'pages': 3, 'total': 5}
?                        ^           ^


======================================================================
FAIL: test_query_does_not_mutate_input (test_orders.OrderContract.test_query_does_not_mutate_input)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private./test_orders.py", line 34, in test_query_does_not_mutate_input
    self.assertEqual(rows, before)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
AssertionError: Lists differ: [{'id': 'E', 'created': 50, 'status': 'cancelled'}[183 chars]id'}] != [{'id': 'A', 'created': 10, 'status': 'paid'}, {'i[183 chars]ed'}]

First differing element 0:
{'id': 'E', 'created': 50, 'status': 'cancelled'}
{'id': 'A', 'created': 10, 'status': 'paid'}

- [{'created': 50, 'id': 'E', 'status': 'cancelled'},
-  {'created': 40, 'id': 'D', 'status': 'paid'},
? ^            ^          ^

+ [{'created': 10, 'id': 'A', 'status': 'paid'},
? ^            ^          ^

   {'created': 30, 'id': 'B', 'status': 'pending'},
   {'created': 20, 'id': 'C', 'status': 'paid'},
-  {'created': 10, 'id': 'A', 'status': 'paid'}]
?              ^          ^                    ^

+  {'created': 40, 'id': 'D', 'status': 'paid'},
?              ^          ^                    ^

+  {'created': 50, 'id': 'E', 'status': 'cancelled'}]

======================================================================
FAIL: test_second_page (test_orders.OrderContract.test_second_page)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private./test_orders.py", line 24, in test_second_page
    self.assertEqual([r["id"] for r in result["items"]], ["B", "C"])
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: ['A'] != ['B', 'C']

First differing element 0:
'A'
'B'

Second list contains 1 additional elements.
First extra element 1:
'C'

- ['A']
+ ['B', 'C']

======================================================================
FAIL: test_total_counts_all_matching_orders (test_orders.OrderContract.test_total_counts_all_matching_orders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private./test_orders.py", line 28, in test_total_counts_all_matching_orders
    self.assertEqual((result["total"], result["pages"]), (5, 3))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (2, 1) != (5, 3)

First differing element 0:
2
5

- (2, 1)
+ (5, 3)

----------------------------------------------------------------------
Ran 11 tests in 0.001s

FAILED (failures=7)
