mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
Add automation override option.
This commit is contained in:
@@ -197,7 +197,6 @@ class Test(unittest.TestCase):
|
||||
cls.node1_statefile = os.path.join(datadir, 'node1_state.json')
|
||||
cls.node1_args = [script_path, '--port', str(UI_PORT + 1), '--configfile', cls.node1_configfile, '--statefile', cls.node1_statefile, '--oneshot', '--debug']
|
||||
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
logging.info('Stopping test')
|
||||
@@ -333,7 +332,7 @@ class Test(unittest.TestCase):
|
||||
assert (count_lines_with(rv_stdout, 'Bid rate too low for offer') == 3)
|
||||
assert (count_lines_with(rv_stdout, 'Already bidding on offer') == 1)
|
||||
|
||||
logging.info(f'Modifying node1 config')
|
||||
logging.info('Modifying node1 config')
|
||||
node1_test1_config['bids'][0]['maxrate'] = 0.07
|
||||
node1_test1_config['bids'][0]['max_coin_from_balance'] = 100
|
||||
node1_test1_config['bids'][0]['min_coin_to_balance'] = 100
|
||||
@@ -418,7 +417,7 @@ class Test(unittest.TestCase):
|
||||
assert (len(possible_bids) == 1)
|
||||
assert (float(possible_bids[0]['amount_from'] < 20.0))
|
||||
|
||||
logging.info(f'Adding mock data to node1 db for tests')
|
||||
logging.info('Adding mock data to node1 db for tests')
|
||||
rows = []
|
||||
offers = read_json_api(UI_PORT, 'offers')
|
||||
|
||||
@@ -523,7 +522,6 @@ class Test(unittest.TestCase):
|
||||
offer_ids = []
|
||||
logging.info('Create three offers')
|
||||
|
||||
|
||||
for i in range(3):
|
||||
if i > 0:
|
||||
with open(self.node0_statefile) as fs:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (c) 2019-2022 tecnovert
|
||||
# Copyright (c) 2019-2023 tecnovert
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -145,6 +145,20 @@ class Test(BaseTest):
|
||||
rv = read_json_api(1800, 'identities/pPCsRro5po7Yu6kyu5XjSyr3A1PPdk9j1F', {'set_label': 'test 3'})
|
||||
assert (rv['error'] == 'Invalid identity address')
|
||||
|
||||
rv = read_json_api(1800, 'identities/ppCsRro5po7Yu6kyu5XjSyr3A1PPdk9j1F', {'set_note': 'note 1'})
|
||||
assert (len(rv) == 1)
|
||||
assert (rv[0]['address'] == 'ppCsRro5po7Yu6kyu5XjSyr3A1PPdk9j1F')
|
||||
assert (rv[0]['label'] == 'test 2')
|
||||
assert (rv[0]['note'] == 'note 1')
|
||||
|
||||
rv = read_json_api(1800, 'identities/ppCsRro5po7Yu6kyu5XjSyr3A1PPdk9j1F', {'set_automation_override': 1})
|
||||
assert (len(rv) == 1)
|
||||
assert (rv[0]['automation_override'] == 1)
|
||||
|
||||
rv = read_json_api(1800, 'identities/ppCsRro5po7Yu6kyu5XjSyr3A1PPdk9j1F', {'set_visibility_override': 'hide'})
|
||||
assert (len(rv) == 1)
|
||||
assert (rv[0]['visibility_override'] == 1)
|
||||
|
||||
def test_01_verifyrawtransaction(self):
|
||||
txn = '0200000001eb6e5c4ebba4efa32f40c7314cad456a64008e91ee30b2dd0235ab9bb67fbdbb01000000ee47304402200956933242dde94f6cf8f195a470f8d02aef21ec5c9b66c5d3871594bdb74c9d02201d7e1b440de8f4da672d689f9e37e98815fb63dbc1706353290887eb6e8f7235012103dc1b24feb32841bc2f4375da91fa97834e5983668c2a39a6b7eadb60e7033f9d205a803b28fe2f86c17db91fa99d7ed2598f79b5677ffe869de2e478c0d1c02cc7514c606382012088a8201fe90717abb84b481c2a59112414ae56ec8acc72273642ca26cc7a5812fdc8f68876a914225fbfa4cb725b75e511810ac4d6f74069bdded26703520140b27576a914207eb66b2fd6ed9924d6217efc7fa7b38dfabe666888acffffffff01e0167118020000001976a9140044e188928710cecba8311f1cf412135b98145c88ac00000000'
|
||||
prevout = {
|
||||
|
||||
Reference in New Issue
Block a user