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

Side by Side Diff: appengine/components/components/auth/ipaddr_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 components.auth import ipaddr 12 from components.auth import ipaddr
13 from test_support import test_case 13 from test_support import test_case
14 14
15 15
16 class IpAddrTest(test_case.TestCase): 16 class IpAddrTest(test_case.TestCase):
17 def test_ip_from_string_v4_ok(self): 17 def test_ip_from_string_v4_ok(self):
18 self.assertEqual( 18 self.assertEqual(
19 ipaddr.IP(32, 0), ipaddr.ip_from_string('0.0.0.0')) 19 ipaddr.IP(32, 0), ipaddr.ip_from_string('0.0.0.0'))
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 'ffff:fffe:fffd:fffc:fffb:fffa:fff0:2', 199 'ffff:fffe:fffd:fffc:fffb:fffa:fff0:2',
200 'ffff:fffe:fffd:fffc:fffb:fffa:fff0:0/127')) 200 'ffff:fffe:fffd:fffc:fffb:fffa:fff0:0/127'))
201 201
202 self.assertFalse(call('0:0:0:0:0:0:0:0', '0.0.0.0/32')) 202 self.assertFalse(call('0:0:0:0:0:0:0:0', '0.0.0.0/32'))
203 203
204 204
205 if __name__ == '__main__': 205 if __name__ == '__main__':
206 if '-v' in sys.argv: 206 if '-v' in sys.argv:
207 unittest.TestCase.maxDiff = None 207 unittest.TestCase.maxDiff = None
208 unittest.main() 208 unittest.main()
OLDNEW
« no previous file with comments | « appengine/components/components/auth/host_token_test.py ('k') | appengine/components/components/auth/model_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698