Total Complexity | 0 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 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 |