Passed
Push — master ( 1bf5cf...d6ff14 )
by Dave
02:20
created

tests.func_save   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 0
1
'''
2
    Test saving application data
3
    Requires services to be running.
4
    Redis
5
'''
6
from domain.mining import Miner
7
from backend.fcmapp import ApplicationService, ComponentName
8
9
APP = ApplicationService(ComponentName.fullcycle)
10
11
KNOWN = APP.allminers()
12
CNT = len(KNOWN)
13
14
MINER = Miner('New Miner2', '', '', '192.168.1.2', '4028', '', '')
15
APP.save_miner(MINER)
16
17
KNOWN2 = APP.allminers()
18
19
CNT2 = len(KNOWN2)
20
print(CNT2)
21
22
APP.save_miner(MINER)
23
24
KNOWN3 = APP.allminers()
25
26
CNT3 = len(KNOWN3)
27
print(CNT3)
28