'Test whether the API returns the right orders when we perform a request'

@deferred(timeout=10)
def test_get_orders(self):

    def on_response(response):
        json_response = json.loads(response)
        self.assertIn('orders', json_response)
        self.assertEqual(len(json_response['orders']), 1)
    self.session.lm.market_community.order_manager.create_ask_order(Price(3, 'DUM1'), Quantity(4, 'DUM2'), Timeout(3600))
    self.should_check_equality = False
    return self.do_request('market/orders', expected_code=200).addCallback(on_response)
