Skip to content

Commit a362f36

Browse files
committed
Clean up fulfillment_event_test.py
1 parent 2ec5c7f commit a362f36

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

test/fulfillment_event_test.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33
from pyactiveresource.activeresource import ActiveResource
44

55
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)
910

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))
1313

14-
# def test_create_fulfillment_event(self):
14+
def test_create_fulfillment_event(self):
15+
pass
1516

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

Comments
 (0)