mirror of
https://git.photon.obnh.io/AXSY/whois.git
synced 2026-03-15 02:43:39 +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:
52
netaddr/tests/2.x/eui/pubsub.txt
Normal file
52
netaddr/tests/2.x/eui/pubsub.txt
Normal file
@@ -0,0 +1,52 @@
|
||||
=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 cStringIO 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
|
||||
... """)
|
||||
|
||||
>>> infile.seek(0)
|
||||
>>> iab_parser = OUIIndexParser(infile)
|
||||
>>> iab_parser.attach(FileIndexer(outfile))
|
||||
>>> iab_parser.parse()
|
||||
>>> print outfile.getvalue(),
|
||||
51966,1,210
|
||||
|
||||
}}}
|
||||
|
||||
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
|
||||
... """)
|
||||
|
||||
>>> infile.seek(0)
|
||||
>>> iab_parser = IABIndexParser(infile)
|
||||
>>> iab_parser.attach(FileIndexer(outfile))
|
||||
>>> iab_parser.parse()
|
||||
>>> print outfile.getvalue(),
|
||||
84683452,1,181
|
||||
|
||||
}}}
|
||||
Reference in New Issue
Block a user