Skip to content

Commit

Permalink
fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhadfield committed Apr 21, 2024
1 parent dd155ea commit 54abc09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,11 @@ def test_import_file_with_chinese_simplified(tmpdir):
hosts_file = tmpdir.mkdir("etc").join("hosts")
hosts_file.write("6.6.6.6\texample.com\n")
hosts = Hosts(path=hosts_file.strpath)
hosts.import_file(import_file_path=os.path.join("test_files", "hosts3"))

import_file = tmpdir.mkdir("input").join("infile")
import_file.write("5.5.5.5\ttest.com 测试\n0.0.0.0\tbob.com\n0.0.0.0\tjane.com\n0.0.0.0\tsimon.com asif.com\n")
hosts.import_file(import_file_path=import_file.strpath)
assert hosts.exists(address='6.6.6.6', names=['example.com'])
assert hosts.exists(address='5.5.5.5', names=['test.com', '测试'])


Expand Down

0 comments on commit 54abc09

Please sign in to comment.