OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 The Swarming Authors. All rights reserved. | 2 # Copyright 2013 The Swarming Authors. All rights reserved. |
3 # Use of this source code is governed by the Apache v2.0 license that can be | 3 # Use of this source code is governed by the Apache v2.0 license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import datetime | 6 import datetime |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import sys | 9 import sys |
10 import time | 10 import time |
11 import unittest | 11 import unittest |
12 import urllib | 12 import urllib |
13 | 13 |
14 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 14 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
15 | 15 |
16 import test_env | 16 import test_env |
17 test_env.setup_test_env() | 17 test_env.setup_test_env() |
18 | 18 |
19 # From components/third_party/ | 19 # From components/third_party/ |
20 import webtest | 20 import webtest |
21 | 21 |
22 import webapp2 | 22 import webapp2 |
23 | 23 |
24 from google.appengine.ext import ndb | 24 from google.appengine.ext import ndb |
25 | 25 |
26 from components import auth | 26 from components import auth |
27 from components import utils | 27 from components import utils |
28 from support import test_case | 28 from test_support import test_case |
29 | 29 |
30 import acl | 30 import acl |
31 import config | 31 import config |
32 import gcs | 32 import gcs |
33 import handlers_api | 33 import handlers_api |
34 import handlers_backend | 34 import handlers_backend |
35 import model | 35 import model |
36 | 36 |
37 # Access to a protected member _XXX of a client class | 37 # Access to a protected member _XXX of a client class |
38 # pylint: disable=W0212 | 38 # pylint: disable=W0212 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 self.assertEqual(['default/' + hash_item(data)], deleted) | 283 self.assertEqual(['default/' + hash_item(data)], deleted) |
284 | 284 |
285 | 285 |
286 if __name__ == '__main__': | 286 if __name__ == '__main__': |
287 if '-v' in sys.argv: | 287 if '-v' in sys.argv: |
288 unittest.TestCase.maxDiff = None | 288 unittest.TestCase.maxDiff = None |
289 logging.basicConfig(level=logging.DEBUG) | 289 logging.basicConfig(level=logging.DEBUG) |
290 else: | 290 else: |
291 logging.basicConfig(level=logging.FATAL) | 291 logging.basicConfig(level=logging.FATAL) |
292 unittest.main() | 292 unittest.main() |
OLD | NEW |