1#!/usr/bin/python 2#pylint: disable-msg=C0111 3 4import unittest 5import common 6#pylint: disable-msg=W0611 7from autotest_lib.frontend import setup_django_lite_environment 8from autotest_lib.frontend.afe import frontend_test_utils 9from autotest_lib.frontend.afe import models 10 11class 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 27if __name__ == '__main__': 28 unittest.main() 29