aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite_text2pcap.py
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-04-30 17:12:20 -0700
committerGerald Combs <gerald@wireshark.org>2018-05-01 00:37:41 +0000
commitd25e7c8d91b46fc038f5dc9f64faf11927de0b06 (patch)
treebb6db38ef74584579babcd60708aa6ffdc06bef8 /test/suite_text2pcap.py
parented384882117696d4ff110e46bc60ebe9ac304974 (diff)
Test: More fixes and updates.
Move UAT file creation to config.py. Run the text2pcap and some of the clopts tests under our default environment. Use "in" instead of "has_key". Change-Id: Ie5c70fb33c29676672bed7bf8205cff0bba77f8a Reviewed-on: https://code.wireshark.org/review/27234 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'test/suite_text2pcap.py')
-rw-r--r--test/suite_text2pcap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/suite_text2pcap.py b/test/suite_text2pcap.py
index baf2ea0c18..3ee84f2b13 100644
--- a/test/suite_text2pcap.py
+++ b/test/suite_text2pcap.py
@@ -115,7 +115,7 @@ def check_text2pcap(self, cap_file, file_type, expected_packets=None, expected_d
# in the output file are the same as in the input file
pre_cap_info = check_capinfos_info(self, cap_file)
- self.assertTrue(encap_to_link_type.has_key(pre_cap_info['encapsulation']))
+ self.assertTrue(pre_cap_info['encapsulation'] in encap_to_link_type)
self.assertTrue(file_type in file_type_to_testout, 'Invalid file type')
@@ -128,7 +128,7 @@ def check_text2pcap(self, cap_file, file_type, expected_packets=None, expected_d
cf = cf_path,
of = testin_file,
)
- self.assertRun(tshark_cmd, shell=True)
+ self.assertRun(tshark_cmd, shell=True, env=os.environ.copy())
testout_fname = file_type_to_testout[file_type]
testout_file = self.filename_from_id(testout_fname)