mirror of
https://git.photon.obnh.io/AXSY/whois.git
synced 2026-03-13 02:01:32 +00:00
Initial commit: mwhois with SCION AS support and decimal AS conversion
Based on mwhois by Antonios A. Chariton Modifications for SCION AS support by Olaf Baumert, Axpo Systems AG
This commit is contained in:
56
netaddr/tests/3.x/eui/pubsub.txt
Normal file
56
netaddr/tests/3.x/eui/pubsub.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
=IEEE Publish/Subscribe Parser Tests=
|
||||
|
||||
Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
|
||||
|
||||
Basic OUIIndexParser and FileIndexer object tests.
|
||||
|
||||
{{{
|
||||
|
||||
>>> from netaddr.eui.ieee import OUIIndexParser, IABIndexParser, FileIndexer
|
||||
>>> from io import StringIO
|
||||
|
||||
>>> infile = StringIO()
|
||||
>>> outfile = StringIO()
|
||||
>>> infile.write("""
|
||||
... 00-CA-FE (hex) ACME CORPORATION
|
||||
... 00CAFE (base 16) ACME CORPORATION
|
||||
... 1 MAIN STREET
|
||||
... SPRINGFIELD
|
||||
... UNITED STATES
|
||||
... """)
|
||||
211
|
||||
>>> infile.seek(0)
|
||||
0
|
||||
>>> iab_parser = OUIIndexParser(infile)
|
||||
>>> iab_parser.attach(FileIndexer(outfile))
|
||||
>>> iab_parser.parse()
|
||||
>>> print(outfile.getvalue())
|
||||
51966,1,210
|
||||
<BLANKLINE>
|
||||
|
||||
}}}
|
||||
|
||||
Basic IABIndexParser and FileIndexer object tests.
|
||||
|
||||
{{{
|
||||
|
||||
>>> infile = StringIO()
|
||||
>>> outfile = StringIO()
|
||||
>>> infile.write("""
|
||||
... 00-50-C2 (hex) ACME CORPORATION
|
||||
... ABC000-ABCFFF (base 16) ACME CORPORATION
|
||||
... 1 MAIN STREET
|
||||
... SPRINGFIELD
|
||||
... UNITED STATES
|
||||
... """)
|
||||
182
|
||||
>>> infile.seek(0)
|
||||
0
|
||||
>>> iab_parser = IABIndexParser(infile)
|
||||
>>> iab_parser.attach(FileIndexer(outfile))
|
||||
>>> iab_parser.parse()
|
||||
>>> print(outfile.getvalue())
|
||||
84683452,1,181
|
||||
<BLANKLINE>
|
||||
|
||||
}}}
|
||||
Reference in New Issue
Block a user