def test_eui_information_subset_for_entry_with_incorrect_encoding(): filename = "sample_incorrect_encoded_oui.txt" index, registry = get_sample_oui_index_and_registry(filename) oui = OUI(9097, index, registry) address = [ 'Oriental Electronics Bldg., #2, Chuangye Road' '\xc3\u201a\xc2\xa3\xc3\u201a\xc2\xac' 'Shangdi Information ' 'Industry Base,', 'Haidian District, Beijing, P.R.China', 'Beijing 100085', 'CHINA' ] assert oui.registration().address == address
def test_oui_constructor(): oui = OUI(524336) assert str(oui) == '08-00-30' assert oui == OUI('08-00-30') assert oui.registration(0).address == [ '2380 N. ROSE AVENUE', 'OXNARD CA 93010', 'US' ] assert oui.registration(0).org == 'NETWORK RESEARCH CORPORATION' assert oui.registration(0).oui == '08-00-30' assert oui.registration(1).address == [ 'GPO BOX 2476V', 'MELBOURNE VIC 3001', 'AU', ] assert oui.registration(1).org == 'ROYAL MELBOURNE INST OF TECH' assert oui.registration(1).oui == '08-00-30' assert oui.registration(2).address == [ 'CH-1211 GENEVE 23', 'SUISSE/SWITZ', 'CH' ] assert oui.registration(2).org == 'CERN' assert oui.registration(2).oui == '08-00-30' assert oui.reg_count == 3