def test_gatherer_asn_fast(): a = Asn(fast='tcp://localhost:5555') x = a._resolve_fast('216.90.108.0') if x.asn: assert x['asn'] == 23028 else: warnings.warn('TC Not Responding...', UserWarning)
def test_gatherer_asn(): a = Asn(fast=False) def _resolve(i): return data a._resolve_ns = _resolve x = a.process(Indicator(indicator='216.90.108.0')) assert x.asn == '23028' assert x.asn_desc.startswith('TEAM-CYMRU')
def test_gatherer_asn(): a = Asn() def _resolve(i): return data a._resolve_ns = _resolve x = a.process(Indicator(indicator='216.90.108.0')) assert x.asn == '23028' assert x.asn_desc.startswith('TEAM-CYMRU')
def test_gatherer_asn(): a = Asn(fast=False) def _resolve(i): return data a._resolve_ns = _resolve x = a.process(Indicator(indicator='216.90.108.0')) if x.asn and x.asn_desc: assert x.asn != '' assert x.asn_desc != '' else: warnings.warn('TC Not Responding...', UserWarning)
def test_gatherer_asn(): a = Asn(fast=False) def _resolve(i): return data a._resolve_ns = _resolve x = a.process(Indicator(indicator='216.90.108.0')) if x.asn and x.asn_desc: assert x.asn == '23028' assert x.asn_desc.startswith('TEAM-CYMRU') else: warnings.warn('TC Not Responding...', UserWarning)
def test_gatherer_asn_fast(): a = Asn(fast='tcp://localhost:5555') x = a._resolve_fast('216.90.108.0') assert x['asn'] == 23028