mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
regests: organize tests in two classes
This commit is contained in:
parent
149cd9598a
commit
73e656522e
1 changed files with 13 additions and 8 deletions
|
@ -17,9 +17,6 @@ class TestLightning(unittest.TestCase):
|
|||
def setUp(self):
|
||||
test_name = self.id().split('.')[-1]
|
||||
sys.stdout.write("***** %s ******\n" % test_name)
|
||||
self.agents = ['alice', 'bob']
|
||||
if test_name in ['test_forwarding', 'test_watchtower']:
|
||||
self.agents.append('carol')
|
||||
# initialize and get funds
|
||||
for agent in self.agents:
|
||||
self.run_shell(['init', agent])
|
||||
|
@ -35,14 +32,13 @@ class TestLightning(unittest.TestCase):
|
|||
for agent in self.agents:
|
||||
self.run_shell(['stop', agent])
|
||||
|
||||
|
||||
class TestLightningAB(TestLightning):
|
||||
agents = ['alice', 'bob']
|
||||
|
||||
def test_breach(self):
|
||||
self.run_shell(['breach'])
|
||||
|
||||
def test_forwarding(self):
|
||||
self.run_shell(['open'])
|
||||
self.run_shell(['alice_pays_carol'])
|
||||
self.run_shell(['close'])
|
||||
|
||||
def test_redeem_htlcs(self):
|
||||
self.run_shell(['redeem_htlcs'])
|
||||
|
||||
|
@ -52,5 +48,14 @@ class TestLightning(unittest.TestCase):
|
|||
def test_breach_with_spent_htlc(self):
|
||||
self.run_shell(['breach_with_spent_htlc'])
|
||||
|
||||
|
||||
class TestLightningABC(TestLightning):
|
||||
agents = ['alice', 'bob', 'carol']
|
||||
|
||||
def test_forwarding(self):
|
||||
self.run_shell(['open'])
|
||||
self.run_shell(['alice_pays_carol'])
|
||||
self.run_shell(['close'])
|
||||
|
||||
def test_watchtower(self):
|
||||
self.run_shell(['watchtower'])
|
||||
|
|
Loading…
Add table
Reference in a new issue