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

tests.func_db   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 0
1
'''test connectivity with database'''
2
#currently using MariaDB (mysql)
3
#mysql  Ver 15.1 Distrib 10.1.23-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2
4
5
import datetime
6
from domain.logging import MinerLog
7
from domain.loggingrepository import getminerlog
8
from backend.fcmapp import ApplicationService, ComponentName
9
10
APP = ApplicationService(ComponentName.fullcycle)
11
12
LOG = MinerLog()
13
LOG.createdate = datetime.datetime.utcnow()
14
LOG.minerid = 'unit test'
15
LOG.minername = 'unit test'
16
LOG.action = 'unit test'
17
APP.log_mineractivity(LOG)
18
19
for log in getminerlog(APP.getsession()):
20
    print(log.__dict__)
21