• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / fx-private-relay / 86e7dfd5-bbcf-4be0-9e70-6e1e946d3caa

22 Apr 2024 08:32AM CUT coverage: 75.611%. Remained the same
86e7dfd5-bbcf-4be0-9e70-6e1e946d3caa

push

circleci

web-flow
Merge pull request #4622 from mozilla/dependabot/npm_and_yarn/fast-check-3.17.2

Bump fast-check from 3.17.1 to 3.17.2

2463 of 3426 branches covered (71.89%)

Branch coverage included in aggregate %.

6813 of 8842 relevant lines covered (77.05%)

19.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/emails/management/commands/get_latest_email_tracker_lists.py
1
import json
×
2
import pathlib
×
3

4
from django.core.management.base import BaseCommand
×
5

6
from emails.utils import download_trackers, shavar_prod_lists_url, store_trackers
×
7

8
EMAILS_FOLDER_PATH = pathlib.Path(__file__).parents[2]
×
9
TRACKER_FOLDER_PATH = EMAILS_FOLDER_PATH / "tracker_lists"
×
10

11

12
class Command(BaseCommand):
×
13
    help = "Fetch and store email tracker lists from Shavar Prod List repository"
×
14

15
    def add_arguments(self, parser):
×
16
        parser.add_argument(
×
17
            "--repo-url",
18
            default=shavar_prod_lists_url,
19
            help="Set url that the email tracker lists will be pulled from",
20
        )
21
        parser.add_argument(
×
22
            "--tracker-level",
23
            default=1,
24
            type=int,
25
            choices=[1, 2],
26
            help="Choose the level of tracker list desired",
27
        )
28

29
    def handle(self, *args, **options):
×
30
        repo_url = options["repo_url"]
×
31
        tracker_level = options["tracker_level"]
×
32

33
        category = "Email"
×
34
        tracker_list_name = "level-one-trackers"
×
35
        if tracker_level == 2:
×
36
            category = "EmailAggressive"
×
37
            tracker_list_name = "level-two-trackers"
×
38

39
        trackers = download_trackers(repo_url, category)
×
40
        file_name = f"{tracker_list_name}.json"
×
41

42
        store_trackers(trackers, TRACKER_FOLDER_PATH, file_name)
×
43
        print(f"Added {file_name} in {TRACKER_FOLDER_PATH}")
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc