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

Side by Side Diff: appengine/swarming/server/task_result_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 tools/third_party/ 19 # From tools/third_party/
21 import webtest 20 import webtest
22 21
23 from google.appengine.ext import deferred 22 from google.appengine.ext import deferred
24 from google.appengine.ext import ndb 23 from google.appengine.ext import ndb
25 24
26 from components import auth_testing 25 from components import auth_testing
27 from components import utils 26 from components import utils
27 from test_support import test_case
28
28 from server import task_pack 29 from server import task_pack
29 from server import task_request 30 from server import task_request
30 from server import task_result 31 from server import task_result
31 from server import task_to_run 32 from server import task_to_run
32 from support import test_case
33 33
34 # pylint: disable=W0212 34 # pylint: disable=W0212
35 35
36 36
37 def _gen_request_data(properties=None, **kwargs): 37 def _gen_request_data(properties=None, **kwargs):
38 base_data = { 38 base_data = {
39 'name': 'Request name', 39 'name': 'Request name',
40 'user': 'Jesus', 40 'user': 'Jesus',
41 'properties': { 41 'properties': {
42 'commands': [[u'command1']], 42 'commands': [[u'command1']],
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 task_result.TaskOutput.CHUNK_SIZE * '\x00' + 'Baz\x00Bar\x00FooWow', 624 task_result.TaskOutput.CHUNK_SIZE * '\x00' + 'Baz\x00Bar\x00FooWow',
625 self.run_result.get_command_output_async(0).get_result()) 625 self.run_result.get_command_output_async(0).get_result())
626 self.assertTaskOutputChunk( 626 self.assertTaskOutputChunk(
627 [{'chunk': 'Baz\x00Bar\x00FooWow', 'gaps': [3, 4, 7, 8]}]) 627 [{'chunk': 'Baz\x00Bar\x00FooWow', 'gaps': [3, 4, 7, 8]}])
628 628
629 629
630 if __name__ == '__main__': 630 if __name__ == '__main__':
631 if '-v' in sys.argv: 631 if '-v' in sys.argv:
632 unittest.TestCase.maxDiff = None 632 unittest.TestCase.maxDiff = None
633 unittest.main() 633 unittest.main()
OLDNEW

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