Home | History | Annotate | Download | only in frontend
      1 #!/usr/bin/python
      2 #pylint: disable-msg=C0111
      3 
      4 import unittest
      5 import common
      6 #pylint: disable-msg=W0611
      7 from autotest_lib.frontend import setup_django_lite_environment
      8 from autotest_lib.frontend.afe import frontend_test_utils
      9 from autotest_lib.frontend.afe import models
     10 
     11 class JobTest(unittest.TestCase, frontend_test_utils.FrontendTestMixin):
     12     """
     13     Test that a jobs can be created when using django as set in
     14     setup_django_lite_environment.
     15     """
     16     def setUp(self):
     17         self._frontend_common_setup()
     18 
     19     def tearDown(self):
     20         self._frontend_common_teardown()
     21 
     22     def test_job_creation(self):
     23         self._create_job()
     24         self.assertEqual(1, models.Job.objects.all().count())
     25 
     26 
     27 if __name__ == '__main__':
     28     unittest.main()
     29