Skip to content

Commit 9c0cfb0

Browse files
committed
Consistently use old variable naming conventions
1 parent 34469fd commit 9c0cfb0

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

webware/MiscUtils/Tests/TestFuncs.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,19 @@ def testHostName(self):
8585
self.assertEqual(host, host.lower())
8686

8787
def testLocalIP(self):
88-
ip_local = localIP()
89-
self.assertTrue(ip_local)
90-
self.assertFalse(ip_local.startswith('127.'))
91-
self.assertEqual(localIP(), ip_local) # second invocation
92-
self.assertEqual(localIP(useCache=None), ip_local)
88+
thisIp = localIP()
89+
self.assertTrue(thisIp)
90+
self.assertFalse(thisIp.startswith('127.'))
91+
self.assertEqual(localIP(), thisIp) # second invocation
92+
self.assertEqual(localIP(useCache=None), thisIp)
9393

94-
def assert_local(ip):
94+
def assertLocal(ip):
9595
self.assertTrue(
96-
ip == ip_local or ip.startswith(('127.', '192.168.'))
96+
ip == thisIp or ip.startswith(('127.', '192.168.'))
9797
or '172.16.' <= ip <= '172.31.')
9898

99-
assert_local(localIP(remote=None, useCache=None))
100-
assert_local(
101-
localIP(remote=('www.hostname.and.domain.are.invalid', 80),
99+
assertLocal(localIP(remote=None, useCache=None))
100+
assertLocal(localIP(remote=('www.hostname.and.domain.are.invalid', 80),
102101
useCache=None))
103102

104103
def testPositiveId(self):

0 commit comments

Comments
 (0)