Commit b6c0e3c1e7a1d21abe85ae379099adeca144b05c

Authored by hitier
1 parent 90fdccc7

Update resource's db and tests with latest models

Showing 2 changed files with 9 additions and 5 deletions   Show diff stats
resources/lesia-btp.sqlite
No preview for this file type
tests/backend_tests.py
1 1 import os
2   -import sys
3 2 import unittest
4   -from shutil import copyfile
5 3  
6 4 from pdc_config import TestConfig
7   -from app import create_app, db_mgr, db
8   -from app.auth.models import User
  5 +from app import create_app, db_mgr
9 6 from tests.common_db_feed import resources_to_instancedb
10 7  
11 8  
... ... @@ -35,9 +32,16 @@ class BaseTestCase(unittest.TestCase):
35 32  
36 33 class DbMgrTestCase(BaseTestCase):
37 34  
  35 + def test_projects(self):
  36 + all_projects = db_mgr.projects()
  37 + self.assertEqual(102, len(all_projects))
  38 +
  39 + def test_projects_columns(self):
  40 + all_projects = db_mgr.projects()
  41 + self.assertEqual(5, len(all_projects[0]))
  42 +
38 43 def test_agents(self):
39 44 all_agents = db_mgr.agents()
40   - print(len(all_agents))
41 45 self.assertEqual(548, len(all_agents))
42 46  
43 47 def test_charges_by_agent(self):
... ...