|
3 | 3 | from pyactiveresource.activeresource import ActiveResource
|
4 | 4 |
|
5 | 5 | class FulFillmentEventTest(TestCase):
|
6 |
| - def setUp(self): |
7 |
| - super(FulFillmentEventTest, self).setUp() |
8 |
| - self.fake("orders/450789469/fulfillments/255858046/events", method='GET', body=self.load_fixture('fulfillment_event')) |
| 6 | + def setUp(self): |
| 7 | + super(FulFillmentEventTest, self).setUp() |
| 8 | + self.fake("orders/2776493818019/fulfillments/2608403447971/events", method='GET', body=self.load_fixture('fulfillment_event')) |
| 9 | + self.fulfillment_event = shopify.FulfillmentEvent.find(order_id=2776493818019, fulfillment_id=2608403447971) |
9 | 10 |
|
10 |
| - def test_get_fulfillment_event(self): |
11 |
| - fulfillment_event = shopify.FulfillmentEvent.find(order_id='450789469', fulfillment_id='255858046') |
12 |
| - self.assertEqual(1, len(fulfillment_event)) |
| 11 | + def test_get_fulfillment_event(self): |
| 12 | + self.assertEqual(1, len(self.fulfillment_event)) |
13 | 13 |
|
14 |
| - # def test_create_fulfillment_event(self): |
| 14 | + def test_create_fulfillment_event(self): |
| 15 | + pass |
15 | 16 |
|
16 |
| - |
17 |
| - def test_error_on_incorrect_status(self): |
18 |
| - with self.assertRaises(AttributeError): |
19 |
| - incorrect_status = 'asdf' |
20 |
| - fulfillment_event = shopify.FulfillmentEvent.find(order_id='450789469', fulfillment_id='255858046') |
21 |
| - fulfillment_event.status = incorrect_status |
22 |
| - fulfillment_event.save() |
| 17 | + def test_error_on_incorrect_status(self): |
| 18 | + with self.assertRaises(AttributeError): |
| 19 | + self.fake("orders/2776493818019/fulfillments/2608403447971/events", method='PUT', body=self.load_fixture('article'), headers={'Content-type': 'application/json'}) |
| 20 | + self.fulfillment_event.save() |
0 commit comments