<reponame>gdoy1/CIB_Reticulated
"""
NAME:          test_database.py
AUTHOR:        <NAME> (Lecturer Health Data Science)
EMAIL:         <EMAIL>
DATE:          24/12/2019
INSTITUTION:   University of Manchester (FBMH)
DESCRIPTION:   Suite of tests for testing the dashboards database
               functionality.
"""

import unittest
from app import app
from app.database.controllers import Database

class DatabaseTests(unittest.TestCase):
    """Class for testing database functionality and connection."""
    def setUp(self):
        """Run prior to each test."""
        self.db_mod = Database()

    def tearDown(self):
        """Run post each test."""
        pass

    def test_get_total_number_unique_items(self):
        """Test that the max quantity as a percentage returns correct value."""
        self.assertEquals(self.db_mod.get_percentage(), 0.14, 'Test total unique items returns correct value')

if __name__ == "__main__":
    unittest.main()
"""
NAME:          test_database.py
AUTHOR:        <NAME> (Lecturer Health Data Science)
EMAIL:         <EMAIL>
DATE:          24/12/2019
INSTITUTION:   University of Manchester (FBMH)
DESCRIPTION:   Suite of tests for testing the dashboards database
               functionality.
"""

import unittest
from app import app
from app.database.controllers import Database

class DatabaseTests(unittest.TestCase):
    """Class for testing database functionality and connection."""
    def setUp(self):
        """Run prior to each test."""
        self.db_mod = Database()

    def tearDown(self):
        """Run post each test."""
        pass

    def test_get_total_number_unique_items(self):
        """Test that the max quantity as a percentage returns correct value."""
        self.assertEquals(self.db_mod.get_percentage(), 0.14, 'Test total unique items returns correct value')

if __name__ == "__main__":
    unittest.main()
NAME:          test_database.py AUTHOR:        <NAME> (Lecturer Health Data Science) EMAIL:         <EMAIL> DATE:          24/12/2019 INSTITUTION:   University of Manchester (FBMH) DESCRIPTION:   Suite of tests for testing the dashboards database                functionality. Class for testing database functionality and connection. Run prior to each test. Run post each test. Test that the max quantity as a percentage returns correct value.