def test_cache (self): """ (Need to rethink how to test the cache) """ dcat = domcat.categorized('mail.google.com') self.assertEqual(dcat.cat, 'benign') dcat = domcat.categorized('mail.google.com') self.assertEqual(dcat.cat, 'benign')
def test_notsure (self): notsure_domains = [ 'd3lvr7yuk4uaui.cloudfront.net', ] for d in notsure_domains: dcat = domcat.categorized(d) self.assertEqual (dcat.cat, 'notsure')
def test_categorized_gray (self): gray_domains = [ 'p**n.dummyxxx1.com', 'tracker.dummyxxx2.com', ] for d in gray_domains: dcat = domcat.categorized(d) self.assertEqual (dcat.cat, 'gray')
def test_categorized_benign (self): benign_domains = [ 'mail.google.com', 'www.microsoft.com', ] for d in benign_domains: dcat = domcat.categorized(d) self.assertEqual (dcat.cat, 'benign')