  
                  assert created__lt is not None
                  return MockQuerySet([
                      item for item in self.items
                      if item.created < int(created__lt)
                  ])
  
              def order_by(self, *ordering):
                  if ordering[0].startswith('-'):
                      return MockQuerySet(list(reversed(self.items)))
 
</s> remove                         if item.created > int(created__gt)
 </s> add                         if item.created is None or item.created > int(created__gt) </s> remove             def filter(self, created__gt=None, created__lt=None):
 </s> add             def filter(self, q):
                q_args = dict(q.deconstruct()[1])
                if not q_args:
                    # django 3.0.x artifact
                    q_args = dict(q.deconstruct()[2])
                created__gt = q_args.get('created__gt')
                created__lt = q_args.get('created__lt')
 </s> remove         return str(attr)
 </s> add         return None if attr is None else str(attr) </s> remove                 has_item_with_unique_position = True
 </s> add                 has_item_with_unique_position = position is not None </s> remove                 has_item_with_unique_position = True
 </s> add                 has_item_with_unique_position = position is not None
                    if item.created is None or item.created < int(created__lt)
  
                  assert created__lt is not None
                  return MockQuerySet([
                      item for item in self.items
                    if item.created is None or item.created < int(created__lt)
                  ])
  
              def order_by(self, *ordering):
                  if ordering[0].startswith('-'):
                      return MockQuerySet(list(reversed(self.items)))
keep keep keep keep replace keep keep keep keep keep
 Ensure CursorPagination respects nulls in the ordering field (#8912)

* Ensure CursorPagination respects nulls in the ordering field

* Lint

* Fix pagination tests

* Add test_ascending with nulls

* Push tests for nulls

* Test pass

* Add comment

* Fix test for django30 
tests/test_pagination.py