Пример #1
0
    def test_find_devices_ordered_with_order_and_direction_desc(self):
        with self.provd_managers() as (device_manager, _, _):
            order, direction = Mock(), 'desc'

            device_dao.find_devices_ordered(order, direction)

            device_manager.find.assert_called_once_with(sort=(order, -1))
Пример #2
0
    def test_find_devices_ordered_with_order_and_direction_desc(self):
        with self.provd_managers() as (device_manager, _, _):
            order, direction = Mock(), 'desc'

            device_dao.find_devices_ordered(order, direction)

            device_manager.find.assert_called_once_with(sort=(order, -1))
Пример #3
0
    def test_find_devices_ordered_no_order(self):
        with self.provd_managers() as (device_manager, _, _):
            order, direction = None, None

            device_dao.find_devices_ordered(order, direction)

            device_manager.find.assert_called_once_with()
Пример #4
0
    def test_find_devices_ordered_no_order(self):
        with self.provd_managers() as (device_manager, _, _):
            order, direction = None, None

            device_dao.find_devices_ordered(order, direction)

            device_manager.find.assert_called_once_with()