~ricgard/maas/vs-repeat-ui-improvement--2.2

« back to all changes in this revision

Viewing changes to src/maasserver/tests/__init__.py

  • Committer: Gavin Panella
  • Date: 2012-01-19 10:37:57 UTC
  • mfrom: (16.3.22 test-bling)
  • Revision ID: gavin.panella@canonical.com-20120119103757-surtgos6dn4krulo
[r=rvba] Adds testtools and testresources, templates for new source files, import formatting utility from Launchpad, and fixes some lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import os
2
 
import unittest
3
 
 
4
 
_test_suite = unittest.TestSuite()
5
 
for module in os.listdir(os.path.dirname(__file__)):
6
 
    if module == '__init__.py' or module[-3:] != '.py':
7
 
        continue
8
 
    mod = __import__(module[:-3], locals(), globals())
9
 
    _test_suite.addTests(unittest.TestLoader().loadTestsFromModule(mod))
 
1
# Copyright 2012 Canonical Ltd.  This software is licensed under the
 
2
# GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
from os.path import dirname
 
5
 
 
6
from django.utils.unittest import defaultTestLoader
 
7
 
10
8
 
11
9
def suite():
12
 
    return _test_suite
 
10
    return defaultTestLoader.discover(dirname(__file__))