Browse Source

Use more correct terms

master
Geoffrey Frogeye 1 year ago
parent
commit
eb1fcefd49
Signed by: geoffrey GPG Key ID: C72403E7F82E6AD8
  1. 16
      run_tests.py
  2. 2
      tests/false-positives.csv
  3. 2
      tests/first-party.csv

16
run_tests.py

@ -21,14 +21,14 @@ if __name__ == '__main__':
for test in reader:
log.info("Testing %s (%s)", test['url'], test['comment'])
for white in test['white'].split(':'):
if not white:
for allow in test['allow'].split(':'):
if not allow:
continue
if any(DB.get_domain(white)):
log.error("False positive: %s", white)
if any(DB.get_domain(allow)):
log.error("False positive: %s", allow)
for black in test['black'].split(':'):
if not black:
for deny in test['deny'].split(':'):
if not deny:
continue
if not any(DB.get_domain(black)):
log.error("False negative: %s", black)
if not any(DB.get_domain(deny)):
log.error("False negative: %s", deny)

2
tests/false-positives.csv

@ -1,4 +1,4 @@
url,white,black,comment
url,allow,deny,comment
https://support.apple.com,support.apple.com,,EdgeKey / AkamaiEdge
https://www.pinterest.fr/,i.pinimg.com,,Cedexis
https://www.tumblr.com/,66.media.tumblr.com,,ChiCDN

2
tests/first-party.csv

@ -1,4 +1,4 @@
url,white,black,comment
url,allow,deny,comment
https://www.red-by-sfr.fr/,static.s-sfr.fr,nrg.red-by-sfr.fr,Eulerian
https://www.cbc.ca/,,smetrics.cbc.ca,2o7 | Ominuture | Adobe Experience Cloud
https://www.discover.com/,,content.discover.com,ThreatMetrix

Loading…
Cancel
Save