def test_descending_sort_by_start_time_puts_instances_with_null_value_last(self):
        self.client.force_authenticate(self.staff)

        factories.InstanceFactory.create_batch(2, start_time=None)
        factories.InstanceFactory()

        response = self.client.get(factories.InstanceFactory.get_list_url(),
                                   data={'o': '-start_time'})
        self.assertEqual(response.status_code, status.HTTP_200_OK)

        self.assertTrue(response.data[1]['start_time'] > response.data[0]['start_time'])

        for i in (2, 3):
            self.assertEqual(response.data[i]['start_time'], None)
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/iaas/tests/test_provisioning.py/InstanceListRetrieveTest.test_descending_sort_by_start_time_puts_instances_with_null_value_last/swapped operands of `>`