blob: a45fe8440e6d683b78a99f894f55612b35fdb737 [file] [log] [blame]
mblighfa29a2a2008-05-16 22:48:09 +00001#!/usr/bin/python
showardf699a2c2008-04-09 23:29:06 +00002
3"""
4This file provides a unittest.TestCase wrapper around the Django unit test
5runner.
6"""
mbligh4205d892008-07-14 16:23:20 +00007import common
showard2de8f902008-06-13 20:49:25 +00008import unittest
9from django.core import management
mbligh4205d892008-07-14 16:23:20 +000010from autotest_lib.frontend import settings
showardf699a2c2008-04-09 23:29:06 +000011
showardf699a2c2008-04-09 23:29:06 +000012
13class FrontendTest(unittest.TestCase):
jadmanski0afbb632008-06-06 21:10:57 +000014 def test_all(self):
showard2de8f902008-06-13 20:49:25 +000015 management.setup_environ(settings)
mbligh4205d892008-07-14 16:23:20 +000016 from autotest_lib.frontend.afe import test
showard2de8f902008-06-13 20:49:25 +000017 errors = test.run_tests()
18 self.assert_(errors == 0, '%s failures in frontend unit tests' % errors)
showardf699a2c2008-04-09 23:29:06 +000019
20if __name__ == '__main__':
jadmanski0afbb632008-06-06 21:10:57 +000021 unittest.main()