try:
    import unittest2 as unittest
except ImportError:
    import unittest

try:
    from unittest import mock
except ImportError:
    import mock

from ..client import Client
from ..exceptions import BadCredentials


class TestClient(unittest.TestCase):
    def test_connect_pass(self):
        with mock.patch.object(Client, 'get_credentials', return_value=True):
            Client(
                ("http://mydomain.com", "http://mystreamingdomain.com"),
                "my_account",
                "my_token"
            )

    def test_connect_fail(self):
        with mock.patch.object(Client, 'get_credentials', return_value=False):
            with self.assertRaises(BadCredentials):
                Client(
                    ("http://mydomain.com", "http://mystreamingdomain.com"),
                    "my_account",
                    "my_token"
                )


class TestOrders(unittest.TestCase):
    def setUp(self):
        with mock.patch.object(Client, 'get_credentials', return_value=True):
            self.client = Client(
                ("http://mydomain.com", "http://mystreamingdomain.com"),
                "my_account",
                "my_token"
            )

    def test_order_creation(self):
        with mock.patch.object(Client, '_Client__call', return_value=True):
            assert self.client.create_order("GPB_EUR", 1)

    def test_get_orders(self):
        with mock.patch.object(Client, '_Client__call', return_value=True):
            assert self.client.get_orders()

    def test_get_order(self):
        pass

    def test_create_order(self):
        pass

    def test_update_order(self):
        pass

    def test_close_order(self):
        pass

@@ -172,16 +172,42 @@
  Client%0A
+from ..order import Order%0A
 from ..e
@@ -1245,32 +1245,56 @@
 creation(self):%0A
+        order = Order()%0A
         with moc
@@ -1401,20 +1401,13 @@
 der(
-%22GPB_EUR%22, 1
+order
 )%0A%0A 

Fix the test