Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: appengine/components/components/datastore_utils/mapping_test.py

Issue 1478573003: Symlink test_env.py instead of test_support in preparation of jinja2. (Closed) Base URL: git@github.com:luci/luci-py.git@2_jinja2
Patch Set: Rebased against master instead of jijna2 Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
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 sys 6 import sys
7 import unittest 7 import unittest
8 8
9 from test_support import test_env 9 import test_env
10 test_env.setup_test_env() 10 test_env.setup_test_env()
11 11
12 from google.appengine.ext import ndb 12 from google.appengine.ext import ndb
13 13
14 from components.datastore_utils import mapping 14 from components.datastore_utils import mapping
15 from test_support import test_case 15 from test_support import test_case
16 16
17 17
18 class EntityX(ndb.Model): 18 class EntityX(ndb.Model):
19 a = ndb.IntegerProperty() 19 a = ndb.IntegerProperty()
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 [EntityX(id=i, a=2) for i in xrange(2, 42, 4)] * 2, 120 [EntityX(id=i, a=2) for i in xrange(2, 42, 4)] * 2,
121 key=lambda x: (x.key.id, x.to_dict())) 121 key=lambda x: (x.key.id, x.to_dict()))
122 actual.sort(key=lambda x: (x.key.id, x.to_dict())) 122 actual.sort(key=lambda x: (x.key.id, x.to_dict()))
123 self.assertEqual(expected, actual) 123 self.assertEqual(expected, actual)
124 124
125 125
126 if __name__ == '__main__': 126 if __name__ == '__main__':
127 if '-v' in sys.argv: 127 if '-v' in sys.argv:
128 unittest.TestCase.maxDiff = None 128 unittest.TestCase.maxDiff = None
129 unittest.main() 129 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698