Skip to content

Commit

Permalink
revised test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
JarryShaw committed Aug 26, 2023
1 parent 94b207c commit fea5833
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .idea/runConfigurations/test_stream.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/test_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

with subprocess.Popen(shlex.split('sudo tcpdump -i en0 -s 0 -w - -U'), # nosec: B603
stdout=subprocess.PIPE) as file:
pcapkit.extract(fin=file.stdout, fout='../sample/stream.txt', format='tree',
pcapkit.extract(fin=file.stdout, fout='../sample/stream.txt', format='tree', no_eof=True,
verbose=True, buffer_save=True, buffer_path='../sample/stream.pcap')
11 changes: 11 additions & 0 deletions test/test_stream_askpass.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-

import shlex
import subprocess # nosec: B404

import pcapkit

with subprocess.Popen(shlex.split('sudo -A tcpdump -i en0 -s 0 -w - -U'), # nosec: B603
stdout=subprocess.PIPE) as file:
pcapkit.extract(fin=file.stdout, fout='../sample/stream.txt', format='tree', no_eof=True,
verbose=True, buffer_save=True, buffer_path='../sample/stream.pcap')

0 comments on commit fea5833

Please sign in to comment.