File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -85,20 +85,19 @@ def testHostName(self):
85
85
self .assertEqual (host , host .lower ())
86
86
87
87
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 )
93
93
94
- def assert_local (ip ):
94
+ def assertLocal (ip ):
95
95
self .assertTrue (
96
- ip == ip_local or ip .startswith (('127.' , '192.168.' ))
96
+ ip == thisIp or ip .startswith (('127.' , '192.168.' ))
97
97
or '172.16.' <= ip <= '172.31.' )
98
98
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 ),
102
101
useCache = None ))
103
102
104
103
def testPositiveId (self ):
You can’t perform that action at this time.
0 commit comments