Beispiel #1
0
 def test_cif_positive(self):
     """
     Checks if the AJAX method of checking an admin is correct
     """
     cpy = Company.objects.all()[:1].get()
     data = get_ajax("/ajax/validate_cif/", {'cif': cpy.cif})
     self.assertTrue(data['is_taken'])
Beispiel #2
0
 def test_admin_negative(self):
     """
     Checks if the AJAX method of checking an admin is correct
     """
     data = get_ajax("/ajax/validate_username/",
                     {'username': "******"})
     self.assertTrue(not data['is_taken'])
Beispiel #3
0
 def test_admin_positive(self):
     """
     Checks if the AJAX method of checking an admin is correct
     """
     admin = Administrator.objects.all()[:1].get()
     data = get_ajax("/ajax/validate_username/",
                     {'username': admin.user.username})
     self.assertTrue(data['is_taken'])
Beispiel #4
0
 def test_shortname_positive(self):
     """
     Checks if the AJAX method of checking a short name is correct
     """
     cpy = Company.objects.all()[:1].get()
     data = get_ajax("/ajax/validate_short_name/",
                     {'short_name': cpy.short_name})
     self.assertTrue(data['is_taken'])