-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_test_runnertest_suite.py
37 lines (31 loc) · 1.47 KB
/
_test_runnertest_suite.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import unittest
from main import *
from blockchain import *
from data import *
import json
class UnitTests(unittest.TestCase):
def test_validity_on_data(self):
espresso.add_block()
espresso.add_data({"sender":"soham", "recipient": "soham", "amount": "10", "memo": "testing"})
espresso.add_data({"sender":"soham", "recipient": "soham", "amount": "10", "memo": "testing"})
espresso.add_block()
espresso.add_block()
espresso.add_block()
espresso.add_block()
espresso.add_data({"sender":"soham", "recipient": "soham", "amount": "10", "memo": "testing"})
espresso.add_data({"sender":"soham", "recipient": "soham", "amount": "10", "memo": "testing"})
espresso.add_block()
espresso.add_block()
espresso.add_block()
espresso.add_data({"sender":"soham", "recipient": "soham", "amount": "10", "memo": "testing"})
espresso.add_data({"sender":"soham", "recipient": "soham", "amount": "10", "memo": "testing"})
espresso.add_block()
espresso.add_block()
espresso.add_data({"sender":"soham", "recipient": "soham", "amount": "10", "memo": "testing"})
espresso.add_data({"sender":"soham", "recipient": "soham", "amount": "10", "memo": "testing"})
espresso.add_data({"sender":"soham", "recipient": "soham", "amount": "10", "memo": "testing"})
espresso.add_block()
espresso.add_block()
espresso.add_block()
valid = espresso.check_validity()
self.assertTrue(valid)