| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The LUCI Authors. All rights reserved. | 2 # Copyright 2014 The LUCI 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 under the Apache License, Version 2.0 |
| 4 # found in the LICENSE file. | 4 # that can be 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 from test_support 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 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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() |
| OLD | NEW |