Commit 506d2f02a7877f9535409dd1e5bb2a9dfe82e488

Authored by hitier
1 parent 919d8186

Initialize unit testing

.gitignore
... ... @@ -4,3 +4,5 @@ app_config.py
4 4 !resources/app_config.py
5 5 .idea
6 6 .flaskenv
  7 +*.xml
  8 +.coverage
... ...
INSTALL.md
... ... @@ -7,3 +7,4 @@ run through docker
7 7 install standalone on your own server
8 8 update your server installation
9 9 ress/flaskenv > .flaskenv
  10 +run tests
... ...
requirements-tests.py 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +pytest
  2 +pytest-cov
... ...
tests/backend_test.py 0 → 100644
... ... @@ -0,0 +1,17 @@
  1 +import unittest
  2 +from pdc_config import TestConfig
  3 +from app import create_app
  4 +
  5 +
  6 +class BaseTestCase(unittest.TestCase):
  7 + def setUp(self):
  8 + # configure data base
  9 + self.app = create_app(TestConfig)
  10 + self.app_context = self.app.app_context()
  11 + self.app_context.push()
  12 +
  13 + def tearDown(self):
  14 + self.app_context.pop()
  15 +
  16 + def test_always_true(self):
  17 + self.assertTrue(True)
... ...