class TestVariables(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')
Esempio n. 2
0
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')
Esempio n. 3
0
def institution_name(request):
    if request.method == 'POST' and request.POST['input_text'] != 'NEWINST':
        inst_code = request.POST['input_text']
        VC1 = VEDACat(inst_code=inst_code)
        institution_name = VC1.institution_name()

    else:
        institution_name = ''

    return HttpResponse(json.dumps(institution_name),
                        content_type="application/json")
Esempio n. 4
0
def institution_name(request):
    if request.method == 'POST' and request.POST['input_text'] != 'NEWINST':
        inst_code = request.POST['input_text']
        print inst_code
        VC1 = VEDACat(inst_code=inst_code)
        institution_name = VC1.institution_name()

    else:
        institution_name = ''

    return HttpResponse(
        json.dumps(institution_name), 
        content_type="application/json"
        )