File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -41,22 +41,22 @@ def test_rewrite_etc_hosts():
41
41
}
42
42
sshuttle .firewall .rewrite_etc_hosts (10 )
43
43
with open ("tmp/hosts" ) as f :
44
- line = f .next ()
44
+ line = f .readline ()
45
45
s = line .split ()
46
46
assert s == ['1.2.3.3' , 'existing' ]
47
47
48
- line = f .next ()
48
+ line = f .readline ()
49
49
s = line .split ()
50
50
assert s == ['1.2.3.4' , 'myhost' ,
51
51
'#' , 'sshuttle-firewall-10' , 'AUTOCREATED' ]
52
52
53
- line = f .next ()
53
+ line = f .readline ()
54
54
s = line .split ()
55
55
assert s == ['1.2.3.5' , 'myotherhost' ,
56
56
'#' , 'sshuttle-firewall-10' , 'AUTOCREATED' ]
57
57
58
- with pytest . raises ( StopIteration ):
59
- line = f . next ()
58
+ line = f . readline ()
59
+ assert line == ""
60
60
61
61
sshuttle .firewall .restore_etc_hosts (10 )
62
62
assert filecmp .cmp ("tmp/hosts.orig" , "tmp/hosts" , shallow = False ) is True
You can’t perform that action at this time.
0 commit comments