Skip to content

Commit 3ed7ba5

Browse files
committed
testing
1 parent 0e46973 commit 3ed7ba5

21 files changed

+15
-24
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

project/test driveshare_graph/test

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

setup.cfg

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[coverage: run]
2+
omit =
3+
app
4+
settings
5+
updateSQL
6+
7+
[coverage: report]
8+
exclude_lines =
9+
if __name__ == "__main__":
10+
pragma: no cover
11+

setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import os
12
from setuptools import setup
23

34
setup(
45
name ='driveshare-graph', version ='1.0',
56
description = 'graph of Storj network activity',
67
author = 'Andrew Kim',
78
url = 'http://storj.io',
8-
install_requires = ['flask','pymongo', 'pygal'],
9-
tests_require = ['coverage', 'coveralls'],
9+
install_requires = open("requirements.txt").readlines(),
10+
tests_require = open("test_requirements.txt").readlines(),
1011
test_suite = 'tests',
1112
)

tests/test_uptime.py

+1-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
import unittest
2-
import sqlite3
3-
import project.uptime as uptime
2+
import driveshare_graph.uptime as uptime
43

54
class Uptime(unittest.TestCase):
65

7-
def setup(self):
8-
self.conn = sqlite3.connect('project/test_network.db')
9-
self.cursor = self.conn.cursor()
10-
11-
def tearDown(self):
12-
self.conn.close()
13-
14-
def test_address_in_db(self):
15-
test_address = '14wLMb2A9APqrdXJhTQArYLyivmEAf7Y1r'
16-
value = uptime.address_in_db(self.cursor, test_address)
17-
self.assertTrue(value)
18-
19-
test_address = 'asdf'
20-
value = uptime.address_in_db(self.cursor, test_address)
21-
self.assertFalse(value)
22-
23-
def test_average_uptime(self):
24-
avg_uptime = uptime.compute_average_uptime(self.cursor)
25-
self.assertTrue(isinstance(avg_uptime, float))
26-
276

0 commit comments

Comments
 (0)