Skip to content

Commit 5574593

Browse files
author
Jayant Krishnamurthy
committed
fix tests
1 parent ee8ce73 commit 5574593

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pyth/tests/test_publish.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_price_acct():
2828
cmd = [
2929
'pyth', 'upd_price_val',
3030
pyth_init_price['LTC'],
31-
'150', '10', 'trading',
31+
'150', '7', 'trading',
3232
'-r', 'localhost',
3333
'-k', pyth_dir,
3434
'-c', 'finalized',
@@ -52,5 +52,5 @@ def get_price_acct():
5252

5353
after = get_price_acct()
5454
assert after['publisher_accounts'][0]['price'] == 150
55-
assert after['publisher_accounts'][0]['conf'] == 10
55+
assert after['publisher_accounts'][0]['conf'] == 7
5656
assert after['publisher_accounts'][0]['status'] == 'trading'

pyth/tests/test_update_price.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,6 @@ def get_publisher_acc(product_acc):
115115

116116
assert publisher_acc['price'] == new_values[product]['price']
117117
assert publisher_acc['conf'] == new_values[product]['conf']
118-
assert publisher_acc['status'] == new_values[product]['status']
118+
119+
expected_status = 'trading' if new_values[product]['conf'] < new_values[product]['price'] / 20 else 'unknown'
120+
assert publisher_acc['status'] == expected_status

0 commit comments

Comments
 (0)