Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(179)

Side by Side Diff: appengine/swarming/server/task_request_test.py

Issue 215360043: Standardize skip_files to test_.+; rename support to test_support. (Closed) Base URL: https://code.google.com/p/swarming@master
Patch Set: Split tool_support/ and test_support/ Created 9 years, 12 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Swarming Authors. All rights reserved. 2 # Copyright 2014 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 random 9 import random
10 import sys 10 import sys
11 import unittest 11 import unittest
12 12
13 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 13 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
14 sys.path.insert(0, ROOT_DIR) 14 sys.path.insert(0, ROOT_DIR)
15 15
16 import test_env 16 import test_env
17
18 test_env.setup_test_env() 17 test_env.setup_test_env()
19 18
20 from google.appengine.api import datastore_errors 19 from google.appengine.api import datastore_errors
21 from google.appengine.ext import ndb 20 from google.appengine.ext import ndb
22 21
23 from components import auth_testing 22 from components import auth_testing
24 from components import utils 23 from components import utils
24 from test_support import test_case
25
25 from server import task_pack 26 from server import task_pack
26 from server import task_request 27 from server import task_request
27 from support import test_case 28
28 29
29 # pylint: disable=W0212 30 # pylint: disable=W0212
30 31
31 32
32 def _gen_request_data(properties=None, **kwargs): 33 def _gen_request_data(properties=None, **kwargs):
33 base_data = { 34 base_data = {
34 'name': 'Request name', 35 'name': 'Request name',
35 'properties': { 36 'properties': {
36 'commands': [[u'command1', u'arg1']], 37 'commands': [[u'command1', u'arg1']],
37 'data': [ 38 'data': [
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 ndb.Key(task_request.TaskRequest, 0x7f14acec2fcfffff), 411 ndb.Key(task_request.TaskRequest, 0x7f14acec2fcfffff),
411 task_request.request_id_to_key(0xeb5313d0300000)) 412 task_request.request_id_to_key(0xeb5313d0300000))
412 413
413 414
414 if __name__ == '__main__': 415 if __name__ == '__main__':
415 if '-v' in sys.argv: 416 if '-v' in sys.argv:
416 unittest.TestCase.maxDiff = None 417 unittest.TestCase.maxDiff = None
417 logging.basicConfig( 418 logging.basicConfig(
418 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) 419 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR)
419 unittest.main() 420 unittest.main()
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b