Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 9fd1b4a

Browse files
authored
Merge pull request #2041 from OpenBazaar/awaitingpayment
All re-processing of transactions if still in AWAITING_PAYMENT state
2 parents 15bf638 + e51a5b5 commit 9fd1b4a

24 files changed

+196
-162
lines changed

qa/eth_cancel_direct_offline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ def run_test(self):
2929
time.sleep(20)
3030

3131
# post profile for alice
32-
with open('testdata/profile.json') as profile_file:
32+
with open('testdata/v5/profile.json') as profile_file:
3333
profile_json = json.load(profile_file, object_pairs_hook=OrderedDict)
3434
api_url = alice["gateway_url"] + "ob/profile"
3535
requests.post(api_url, data=json.dumps(profile_json, indent=4))
3636

3737
# post listing to alice
38-
with open('testdata/eth_listing.json') as listing_file:
38+
with open('testdata/v5/eth_listing.json') as listing_file:
3939
listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)
4040
listing_json["item"]["priceCurrency"]["code"] = "T" + self.cointype
4141
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
@@ -66,7 +66,7 @@ def run_test(self):
6666
time.sleep(4)
6767

6868
# bob send order
69-
with open('testdata/order_direct.json') as order_file:
69+
with open('testdata/v5/order_direct.json') as order_file:
7070
order_json = json.load(order_file, object_pairs_hook=OrderedDict)
7171
order_json["items"][0]["listingHash"] = listingId
7272
order_json["paymentCoin"] = "T" + self.cointype

qa/eth_complete_direct_online.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ def run_test(self):
2929
time.sleep(20)
3030

3131
# post profile for alice
32-
with open('testdata/profile.json') as profile_file:
32+
with open('testdata/v5/profile.json') as profile_file:
3333
profile_json = json.load(profile_file, object_pairs_hook=OrderedDict)
3434
api_url = alice["gateway_url"] + "ob/profile"
3535
requests.post(api_url, data=json.dumps(profile_json, indent=4))
3636

3737
# post listing to alice
38-
with open('testdata/eth_listing.json') as listing_file:
38+
with open('testdata/v5/eth_listing.json') as listing_file:
3939
listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)
4040
listing_json["item"]["priceCurrency"]["code"] = "T" + self.cointype
4141
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
@@ -61,7 +61,7 @@ def run_test(self):
6161
listingId = resp[0]["hash"]
6262

6363
# bob send order
64-
with open('testdata/order_direct.json') as order_file:
64+
with open('testdata/v5/order_direct.json') as order_file:
6565
order_json = json.load(order_file, object_pairs_hook=OrderedDict)
6666
order_json["items"][0]["listingHash"] = listingId
6767
order_json["paymentCoin"] = "T" + self.cointype
@@ -143,7 +143,7 @@ def run_test(self):
143143
raise TestFailure("EthCompleteDirectOnlineTest - FAIL: Alice incorrectly saved as unfunded")
144144

145145
# alice send order fulfillment
146-
with open('testdata/fulfillment.json') as fulfillment_file:
146+
with open('testdata/v5/fulfillment.json') as fulfillment_file:
147147
fulfillment_json = json.load(fulfillment_file, object_pairs_hook=OrderedDict)
148148
fulfillment_json["orderId"] = orderId
149149
fulfillment_json["slug"] = slug

qa/eth_complete_disputed.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def run_test(self):
4141
time.sleep(4)
4242

4343
# make charlie a moderator
44-
with open('testdata/moderation.json') as listing_file:
44+
with open('testdata/v5/moderation.json') as listing_file:
4545
moderation_json = json.load(listing_file, object_pairs_hook=OrderedDict)
4646
api_url = charlie["gateway_url"] + "ob/moderator"
4747
r = requests.put(api_url, data=json.dumps(moderation_json, indent=4))
@@ -54,13 +54,13 @@ def run_test(self):
5454
time.sleep(4)
5555

5656
# post profile for alice
57-
with open('testdata/profile.json') as profile_file:
57+
with open('testdata/v5/profile.json') as profile_file:
5858
profile_json = json.load(profile_file, object_pairs_hook=OrderedDict)
5959
api_url = alice["gateway_url"] + "ob/profile"
6060
requests.post(api_url, data=json.dumps(profile_json, indent=4))
6161

6262
# post listing to alice
63-
with open('testdata/eth_listing.json') as listing_file:
63+
with open('testdata/v5/eth_listing.json') as listing_file:
6464
listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)
6565
listing_json["item"]["priceCurrency"]["code"] = "T" + self.cointype
6666
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
@@ -85,7 +85,7 @@ def run_test(self):
8585
listingId = resp[0]["hash"]
8686

8787
# bob send order
88-
with open('testdata/order_direct.json') as order_file:
88+
with open('testdata/v5/order_direct.json') as order_file:
8989
order_json = json.load(order_file, object_pairs_hook=OrderedDict)
9090
order_json["items"][0]["listingHash"] = listingId
9191
order_json["moderator"] = moderatorId
@@ -166,7 +166,7 @@ def run_test(self):
166166
raise TestFailure("EthCompleteDisputedTest - FAIL: Alice incorrectly saved as unfunded")
167167

168168
# alice send order fulfillment
169-
with open('testdata/fulfillment.json') as fulfillment_file:
169+
with open('testdata/v5/fulfillment.json') as fulfillment_file:
170170
fulfillment_json = json.load(fulfillment_file, object_pairs_hook=OrderedDict)
171171
fulfillment_json["orderId"] = orderId
172172
fulfillment_json["slug"] = slug

qa/eth_complete_moderated_online.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def run_test(self):
4141
time.sleep(4)
4242

4343
# make charlie a moderator
44-
with open('testdata/moderation.json') as listing_file:
44+
with open('testdata/v5/moderation.json') as listing_file:
4545
moderation_json = json.load(listing_file, object_pairs_hook=OrderedDict)
4646
api_url = charlie["gateway_url"] + "ob/moderator"
4747
r = requests.put(api_url, data=json.dumps(moderation_json, indent=4))
@@ -54,13 +54,13 @@ def run_test(self):
5454
time.sleep(4)
5555

5656
# post profile for alice
57-
with open('testdata/profile.json') as profile_file:
57+
with open('testdata/v5/profile.json') as profile_file:
5858
profile_json = json.load(profile_file, object_pairs_hook=OrderedDict)
5959
api_url = alice["gateway_url"] + "ob/profile"
6060
requests.post(api_url, data=json.dumps(profile_json, indent=4))
6161

6262
# post listing to alice
63-
with open('testdata/eth_listing.json') as listing_file:
63+
with open('testdata/v5/eth_listing.json') as listing_file:
6464
listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)
6565
listing_json["item"]["priceCurrency"]["code"] = "T" + self.cointype
6666
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
@@ -86,7 +86,7 @@ def run_test(self):
8686
listingId = resp[0]["hash"]
8787

8888
# bob send order
89-
with open('testdata/order_direct.json') as order_file:
89+
with open('testdata/v5/order_direct.json') as order_file:
9090
order_json = json.load(order_file, object_pairs_hook=OrderedDict)
9191
order_json["items"][0]["listingHash"] = listingId
9292
order_json["moderator"] = moderatorId
@@ -167,7 +167,7 @@ def run_test(self):
167167
raise TestFailure("EthCompleteModeratedOnlineTest - FAIL: Alice incorrectly saved as unfunded")
168168

169169
# alice send order fulfillment
170-
with open('testdata/fulfillment.json') as fulfillment_file:
170+
with open('testdata/v5/fulfillment.json') as fulfillment_file:
171171
fulfillment_json = json.load(fulfillment_file, object_pairs_hook=OrderedDict)
172172
fulfillment_json["slug"] = slug
173173
fulfillment_json["orderId"] = orderId
@@ -199,7 +199,7 @@ def run_test(self):
199199
raise TestFailure("EthCompleteModeratedOnlineTest - FAIL: Alice failed to order fulfillment")
200200

201201
# bob send order completion
202-
with open('testdata/completion.json') as completion_file:
202+
with open('testdata/v5/completion.json') as completion_file:
203203
completion_json = json.load(completion_file, object_pairs_hook=OrderedDict)
204204
completion_json["orderId"] = orderId
205205
completion_json["ratings"][0]["slug"] = slug

qa/eth_complete_moderated_with_timeout.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def run_test(self):
4141
time.sleep(4)
4242

4343
# make charlie a moderator
44-
with open('testdata/moderation.json') as listing_file:
44+
with open('testdata/v5/moderation.json') as listing_file:
4545
moderation_json = json.load(listing_file, object_pairs_hook=OrderedDict)
4646
api_url = charlie["gateway_url"] + "ob/moderator"
4747
r = requests.put(api_url, data=json.dumps(moderation_json, indent=4))
@@ -54,13 +54,13 @@ def run_test(self):
5454
time.sleep(4)
5555

5656
# post profile for alice
57-
with open('testdata/profile.json') as profile_file:
57+
with open('testdata/v5/profile.json') as profile_file:
5858
profile_json = json.load(profile_file, object_pairs_hook=OrderedDict)
5959
api_url = alice["gateway_url"] + "ob/profile"
6060
requests.post(api_url, data=json.dumps(profile_json, indent=4))
6161

6262
# post listing to alice
63-
with open('testdata/eth_listing.json') as listing_file:
63+
with open('testdata/v5/eth_listing.json') as listing_file:
6464
listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)
6565
listing_json["item"]["priceCurrency"]["code"] = "T" + self.cointype
6666
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
@@ -87,7 +87,7 @@ def run_test(self):
8787
listingId = resp[0]["hash"]
8888

8989
# bob send order
90-
with open('testdata/order_direct.json') as order_file:
90+
with open('testdata/v5/order_direct.json') as order_file:
9191
order_json = json.load(order_file, object_pairs_hook=OrderedDict)
9292
order_json["items"][0]["listingHash"] = listingId
9393
order_json["moderator"] = moderatorId
@@ -168,7 +168,7 @@ def run_test(self):
168168
raise TestFailure("EthCompleteModeratedWithTimeout - FAIL: Alice incorrectly saved as unfunded")
169169

170170
# alice send order fulfillment
171-
with open('testdata/fulfillment.json') as fulfillment_file:
171+
with open('testdata/v5/fulfillment.json') as fulfillment_file:
172172
fulfillment_json = json.load(fulfillment_file, object_pairs_hook=OrderedDict)
173173
fulfillment_json["slug"] = slug
174174
fulfillment_json["orderId"] = orderId
@@ -200,7 +200,7 @@ def run_test(self):
200200
raise TestFailure("EthCompleteModeratedWithTimeout - FAIL: Alice failed to order fulfillment")
201201

202202
# bob send order completion
203-
with open('testdata/completion.json') as completion_file:
203+
with open('testdata/v5/completion.json') as completion_file:
204204
completion_json = json.load(completion_file, object_pairs_hook=OrderedDict)
205205
completion_json["orderId"] = orderId
206206
completion_json["ratings"][0]["slug"] = slug

qa/eth_dispute_close_buyer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def run_test(self):
3939
time.sleep(4)
4040

4141
# make charlie a moderator
42-
with open('testdata/moderation.json') as listing_file:
42+
with open('testdata/v5/moderation.json') as listing_file:
4343
moderation_json = json.load(listing_file, object_pairs_hook=OrderedDict)
4444
api_url = charlie["gateway_url"] + "ob/moderator"
4545
r = requests.put(api_url, data=json.dumps(moderation_json, indent=4))
@@ -52,13 +52,13 @@ def run_test(self):
5252
time.sleep(4)
5353

5454
# post profile for alice
55-
with open('testdata/profile.json') as profile_file:
55+
with open('testdata/v5/profile.json') as profile_file:
5656
profile_json = json.load(profile_file, object_pairs_hook=OrderedDict)
5757
api_url = alice["gateway_url"] + "ob/profile"
5858
requests.post(api_url, data=json.dumps(profile_json, indent=4))
5959

6060
# post listing to alice
61-
with open('testdata/eth_listing.json') as listing_file:
61+
with open('testdata/v5/eth_listing.json') as listing_file:
6262
listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)
6363
listing_json["item"]["priceCurrency"]["code"] = "T" + self.cointype
6464
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
@@ -82,7 +82,7 @@ def run_test(self):
8282
listingId = resp[0]["hash"]
8383

8484
# bob send order
85-
with open('testdata/order_direct.json') as order_file:
85+
with open('testdata/v5/order_direct.json') as order_file:
8686
order_json = json.load(order_file, object_pairs_hook=OrderedDict)
8787
order_json["items"][0]["listingHash"] = listingId
8888
order_json["moderator"] = moderatorId

qa/eth_dispute_close_split.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def run_test(self):
4242
time.sleep(4)
4343

4444
# make charlie a moderator
45-
with open('testdata/moderation.json') as listing_file:
45+
with open('testdata/v5/moderation.json') as listing_file:
4646
moderation_json = json.load(listing_file, object_pairs_hook=OrderedDict)
4747
api_url = charlie["gateway_url"] + "ob/moderator"
4848
r = requests.put(api_url, data=json.dumps(moderation_json, indent=4))
@@ -55,13 +55,13 @@ def run_test(self):
5555
time.sleep(4)
5656

5757
# post profile for alice
58-
with open('testdata/profile.json') as profile_file:
58+
with open('testdata/v5/profile.json') as profile_file:
5959
profile_json = json.load(profile_file, object_pairs_hook=OrderedDict)
6060
api_url = alice["gateway_url"] + "ob/profile"
6161
requests.post(api_url, data=json.dumps(profile_json, indent=4))
6262

6363
# post listing to alice
64-
with open('testdata/eth_listing.json') as listing_file:
64+
with open('testdata/v5/eth_listing.json') as listing_file:
6565
listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)
6666
listing_json["item"]["priceCurrency"]["code"] = "T" + self.cointype
6767
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
@@ -85,7 +85,7 @@ def run_test(self):
8585
listingId = resp[0]["hash"]
8686

8787
# bob send order
88-
with open('testdata/order_direct.json') as order_file:
88+
with open('testdata/v5/order_direct.json') as order_file:
8989
order_json = json.load(order_file, object_pairs_hook=OrderedDict)
9090
order_json["items"][0]["listingHash"] = listingId
9191
order_json["moderator"] = moderatorId

qa/eth_dispute_close_vendor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def run_test(self):
4242
time.sleep(4)
4343

4444
# make charlie a moderator
45-
with open('testdata/moderation.json') as listing_file:
45+
with open('testdata/v5/moderation.json') as listing_file:
4646
moderation_json = json.load(listing_file, object_pairs_hook=OrderedDict)
4747
api_url = charlie["gateway_url"] + "ob/moderator"
4848
r = requests.put(api_url, data=json.dumps(moderation_json, indent=4))
@@ -55,13 +55,13 @@ def run_test(self):
5555
time.sleep(4)
5656

5757
# post profile for alice
58-
with open('testdata/profile.json') as profile_file:
58+
with open('testdata/v5/profile.json') as profile_file:
5959
profile_json = json.load(profile_file, object_pairs_hook=OrderedDict)
6060
api_url = alice["gateway_url"] + "ob/profile"
6161
requests.post(api_url, data=json.dumps(profile_json, indent=4))
6262

6363
# post listing to alice
64-
with open('testdata/eth_listing.json') as listing_file:
64+
with open('testdata/v5/eth_listing.json') as listing_file:
6565
listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)
6666
listing_json["item"]["priceCurrency"]["code"] = "T" + self.cointype
6767
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
@@ -87,7 +87,7 @@ def run_test(self):
8787
listingId = resp[0]["hash"]
8888

8989
# bob send order
90-
with open('testdata/order_direct.json') as order_file:
90+
with open('testdata/v5/order_direct.json') as order_file:
9191
order_json = json.load(order_file, object_pairs_hook=OrderedDict)
9292
order_json["items"][0]["listingHash"] = listingId
9393
order_json["moderator"] = moderatorId
@@ -168,7 +168,7 @@ def run_test(self):
168168
raise TestFailure("EthDisputeCloseVendorTest - FAIL: Alice incorrectly saved as unfunded")
169169

170170
# alice send order fulfillment
171-
with open('testdata/fulfillment.json') as fulfillment_file:
171+
with open('testdata/v5/fulfillment.json') as fulfillment_file:
172172
fulfillment_json = json.load(fulfillment_file, object_pairs_hook=OrderedDict)
173173
fulfillment_json["orderId"] = orderId
174174
fulfillment_json["slug"] = slug

qa/eth_escrow_release_after_timeout.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def run_test(self):
4646
time.sleep(4)
4747

4848
# make charlie a moderator
49-
with open('testdata/moderation.json') as listing_file:
49+
with open('testdata/v5/moderation.json') as listing_file:
5050
moderation_json = json.load(listing_file, object_pairs_hook=OrderedDict)
5151
api_url = charlie["gateway_url"] + "ob/moderator"
5252
r = requests.put(api_url, data=json.dumps(moderation_json, indent=4))
@@ -59,13 +59,13 @@ def run_test(self):
5959
time.sleep(4)
6060

6161
# post profile for alice
62-
with open('testdata/profile.json') as profile_file:
62+
with open('testdata/v5/profile.json') as profile_file:
6363
profile_json = json.load(profile_file, object_pairs_hook=OrderedDict)
6464
api_url = alice["gateway_url"] + "ob/profile"
6565
requests.post(api_url, data=json.dumps(profile_json, indent=4))
6666

6767
# post listing to alice
68-
with open('testdata/eth_listing.json') as listing_file:
68+
with open('testdata/v5/eth_listing.json') as listing_file:
6969
listing_json = json.load(listing_file, object_pairs_hook=OrderedDict)
7070
listing_json["item"]["priceCurrency"]["code"] = "T" + self.cointype
7171
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
@@ -92,7 +92,7 @@ def run_test(self):
9292
listingId = resp[0]["hash"]
9393

9494
# bob send order
95-
with open('testdata/order_direct.json') as order_file:
95+
with open('testdata/v5/order_direct.json') as order_file:
9696
order_json = json.load(order_file, object_pairs_hook=OrderedDict)
9797
order_json["items"][0]["listingHash"] = listingId
9898
order_json["moderator"] = moderatorId
@@ -173,7 +173,7 @@ def run_test(self):
173173
raise TestFailure("EthEscrowTimeoutRelease - FAIL: Alice incorrectly saved as unfunded")
174174

175175
# alice send order fulfillment
176-
with open('testdata/fulfillment.json') as fulfillment_file:
176+
with open('testdata/v5/fulfillment.json') as fulfillment_file:
177177
fulfillment_json = json.load(fulfillment_file, object_pairs_hook=OrderedDict)
178178
fulfillment_json["slug"] = slug
179179
fulfillment_json["orderId"] = orderId

0 commit comments

Comments
 (0)