test_cat_tool.py 612 Bytes
Newer Older
Gregory Martin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

import os
import sys
import unittest

"""
A basic unittest for the "Course Addition Tool"

"""

sys.path.append(
    os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
)
from course_validate import VEDACat


class TestVariables(unittest.TestCase):

    def setUp(self):
        self.VCT = VEDACat()

    def test_config(self):
        self.assertTrue(len(self.VCT.veda_model) > 0)

    def test_institution_valid(self):
        self.VCT.inst_code = '111'
        self.assertTrue(self.VCT.institution_name() == 'Error')


def main():
    unittest.main()

if __name__ == '__main__':
    sys.exit(main())