From d3777c27e535040dea2a0c605d23232fdd245ae0 Mon Sep 17 00:00:00 2001 From: Nargis Sultani Date: Fri, 22 Mar 2024 14:06:04 -0400 Subject: [PATCH 1/3] Ticket 131: seed denied domains table --- .../d6e4a13fbebd_seed_denied_domains_table.py | 189 ++++++++++++++++++ poetry.lock | 14 +- .../test_lookup_tables_data_seed.py | 21 ++ 3 files changed, 217 insertions(+), 7 deletions(-) create mode 100644 db_revisions/versions/d6e4a13fbebd_seed_denied_domains_table.py diff --git a/db_revisions/versions/d6e4a13fbebd_seed_denied_domains_table.py b/db_revisions/versions/d6e4a13fbebd_seed_denied_domains_table.py new file mode 100644 index 0000000..5988fac --- /dev/null +++ b/db_revisions/versions/d6e4a13fbebd_seed_denied_domains_table.py @@ -0,0 +1,189 @@ +"""seed denied domains table + +Revision ID: d6e4a13fbebd +Revises: 0e520c01fb42 +Create Date: 2024-03-22 02:13:50.455432 + +""" + +from typing import Sequence, Union + +from alembic import op +from db_revisions.utils import get_indices_from_collection, get_table_by_name + + +# revision identifiers, used by Alembic. +revision: str = "d6e4a13fbebd" +down_revision: Union[str, None] = "0e520c01fb42" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + +seed_data = [ + {"domain": "aol.com"}, + {"domain": "att.net"}, + {"domain": "comcast.net"}, + {"domain": "facebook.com"}, + {"domain": "gmail.com"}, + {"domain": "gmx.com"}, + {"domain": "googlemail.com"}, + {"domain": "google.com"}, + {"domain": "hotmail.com"}, + {"domain": "hotmail.co.uk"}, + {"domain": "mac.com"}, + {"domain": "me.com"}, + {"domain": "mail.com"}, + {"domain": "msn.com"}, + {"domain": "live.com"}, + {"domain": "sbcglobal.net"}, + {"domain": "verizon.net"}, + {"domain": "yahoo.com"}, + {"domain": "yahoo.co.uk"}, + {"domain": "email.com"}, + {"domain": "fastmail.fm"}, + {"domain": "games.com"}, + {"domain": "gmx.net"}, + {"domain": "hush.com"}, + {"domain": "hushmail.com"}, + {"domain": "icloud.com"}, + {"domain": "iname.com"}, + {"domain": "inbox.com"}, + {"domain": "lavabit.com"}, + {"domain": "love.com"}, + {"domain": "outlook.com"}, + {"domain": "pobox.com"}, + {"domain": "protonmail.ch"}, + {"domain": "protonmail.com"}, + {"domain": "tutanota.de"}, + {"domain": "tutanota.com"}, + {"domain": "tutamail.com"}, + {"domain": "tuta.io"}, + {"domain": "keemail.me"}, + {"domain": "rocketmail.com"}, + {"domain": "safe-mail.net"}, + {"domain": "wow.com,ygm.com"}, + {"domain": "ymail.com"}, + {"domain": "zoho.com"}, + {"domain": "yandex.com"}, + {"domain": "bellsouth.net"}, + {"domain": "charter.net"}, + {"domain": "cox.net"}, + {"domain": "earthlink.net"}, + {"domain": "juno.com"}, + {"domain": "btinternet.com"}, + {"domain": "virginmedia.com"}, + {"domain": "blueyonder.co.uk"}, + {"domain": "freeserve.co.uk"}, + {"domain": "live.co.uk"}, + {"domain": "ntlworld.com"}, + {"domain": "o2.co.uk"}, + {"domain": "orange.net"}, + {"domain": "sky.com"}, + {"domain": "talktalk.co.uk"}, + {"domain": "tiscali.co.uk"}, + {"domain": "virgin.net"}, + {"domain": "wanadoo.co.uk"}, + {"domain": "bt.com"}, + {"domain": "sina.com"}, + {"domain": "sina.cn"}, + {"domain": "qq.com"}, + {"domain": "naver.com"}, + {"domain": "hanmail.net"}, + {"domain": "daum.net"}, + {"domain": "nate.com"}, + {"domain": "yahoo.co.jp"}, + {"domain": "yahoo.co.kr"}, + {"domain": "yahoo.co.id"}, + {"domain": "yahoo.co.in"}, + {"domain": "yahoo.com.sg"}, + {"domain": "yahoo.com.ph"}, + {"domain": "163.com"}, + {"domain": "yeah.net"}, + {"domain": "126.com"}, + {"domain": "21cn.com"}, + {"domain": "aliyun.com"}, + {"domain": "foxmail.com"}, + {"domain": "hotmail.fr"}, + {"domain": "live.fr"}, + {"domain": "laposte.net"}, + {"domain": "yahoo.fr"}, + {"domain": "wanadoo.fr"}, + {"domain": "orange.fr"}, + {"domain": "gmx.fr"}, + {"domain": "sfr.fr"}, + {"domain": "neuf.fr"}, + {"domain": "free.fr"}, + {"domain": "gmx.de"}, + {"domain": "hotmail.de"}, + {"domain": "live.de"}, + {"domain": "online.de"}, + {"domain": "t-online.de"}, + {"domain": "web.de"}, + {"domain": "yahoo.de"}, + {"domain": "libero.it"}, + {"domain": "virgilio.it"}, + {"domain": "hotmail.it"}, + {"domain": "aol.it"}, + {"domain": "tiscali.it"}, + {"domain": "alice.it"}, + {"domain": "live.it"}, + {"domain": "yahoo.it"}, + {"domain": "email.it"}, + {"domain": "tin.it"}, + {"domain": "poste.it"}, + {"domain": "teletu.it"}, + {"domain": "mail.ru"}, + {"domain": "rambler.ru"}, + {"domain": "yandex.ru"}, + {"domain": "ya.ru"}, + {"domain": "list.ru"}, + {"domain": "hotmail.be"}, + {"domain": "live.be"}, + {"domain": "skynet.be"}, + {"domain": "voo.be"}, + {"domain": "tvcablenet.be"}, + {"domain": "telenet.be"}, + {"domain": "hotmail.com.ar"}, + {"domain": "live.com.ar"}, + {"domain": "yahoo.com.ar"}, + {"domain": "fibertel.com.ar"}, + {"domain": "speedy.com.ar"}, + {"domain": "arnet.com.ar"}, + {"domain": "yahoo.com.mx"}, + {"domain": "live.com.mx"}, + {"domain": "hotmail.es"}, + {"domain": "hotmail.com.mx"}, + {"domain": "prodigy.net.mx"}, + {"domain": "yahoo.ca"}, + {"domain": "hotmail.ca"}, + {"domain": "bell.net"}, + {"domain": "shaw.ca"}, + {"domain": "sympatico.ca"}, + {"domain": "rogers.com"}, + {"domain": "yahoo.com.br"}, + {"domain": "hotmail.com.br"}, + {"domain": "outlook.com.br"}, + {"domain": "uol.com.br"}, + {"domain": "bol.com.br"}, + {"domain": "terra.com.br"}, + {"domain": "ig.com.br"}, + {"domain": "itelefonica.com.br"}, + {"domain": "r7.com"}, + {"domain": "zipmail.com.br"}, + {"domain": "globo.com"}, + {"domain": "globomail.com"}, + {"domain": "oi.com.br"}, +] + + +def upgrade() -> None: + table = get_table_by_name("denied_domains") + + op.bulk_insert(table, seed_data) + + +def downgrade() -> None: + table = get_table_by_name("denied_domains") + + domains = get_indices_from_collection(seed_data, "domain") + + op.execute(table.delete().where(table.c.domain.in_(domains))) diff --git a/poetry.lock b/poetry.lock index a489c2f..e28544f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "aiosqlite" @@ -1165,17 +1165,17 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "pytest-mock (>=3.12)"] [[package]] name = "pytest-mock" -version = "3.12.0" +version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-mock-3.12.0.tar.gz", hash = "sha256:31a40f038c22cad32287bb43932054451ff5583ff094bca6f675df2f8bc1a6e9"}, - {file = "pytest_mock-3.12.0-py3-none-any.whl", hash = "sha256:0972719a7263072da3a21c7f4773069bcc7486027d7e8e1f81d98a47e701bc4f"}, + {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, + {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, ] [package.dependencies] -pytest = ">=5.0" +pytest = ">=6.2.5" [package.extras] dev = ["pre-commit", "pytest-asyncio", "tox"] @@ -1240,7 +1240,7 @@ name = "regtech-api-commons" version = "0.1.0" description = "" optional = false -python-versions = "^3.11" +python-versions = "^3.12" files = [] develop = false @@ -1255,7 +1255,7 @@ requests = "^2.31.0" type = "git" url = "https://github.com/cfpb/regtech-api-commons.git" reference = "HEAD" -resolved_reference = "29356c630d2609cb81087ce35dd6c79512954d49" +resolved_reference = "8d98c7e574a6f8290d83f7836dd9d402263d891f" [[package]] name = "requests" diff --git a/tests/migrations/test_lookup_tables_data_seed.py b/tests/migrations/test_lookup_tables_data_seed.py index 90940f1..6baf727 100644 --- a/tests/migrations/test_lookup_tables_data_seed.py +++ b/tests/migrations/test_lookup_tables_data_seed.py @@ -106,3 +106,24 @@ def test_sbl_institution_type_data_seed(alembic_runner: MigrationContext, alembi text("SELECT id, name FROM %s" % sbl_institution_type_tablename) ).fetchall() assert sbl_institution_type_before_seed == [("00", "TestSblInstitutionType")] + + +def test_denied_domains_data_seed(alembic_runner: MigrationContext, alembic_engine: Engine): + # Migrate up to, but not including this new migration + alembic_runner.migrate_up_before("d6e4a13fbebd") + + # Test denied_domains seed + denied_domain_tablename = "denied_domains" + alembic_runner.migrate_up_one() + with alembic_engine.connect() as conn: + denied_domains_rows = conn.execute( + text("SELECT domain from %s where domain = :domain " % denied_domain_tablename), (dict(domain="yahoo.fr")) + ).fetchall() + denied_domains_expected = [("yahoo.fr",)] + + assert denied_domains_rows == denied_domains_expected + + alembic_runner.migrate_down_one() + with alembic_engine.connect() as conn: + denied_domains_before_seed = conn.execute(text("SELECT domain FROM %s" % denied_domain_tablename)).fetchall() + assert denied_domains_before_seed == [] From d17632b0e3ca63588a7e3543f40c06ab3cf03980 Mon Sep 17 00:00:00 2001 From: Nargis Sultani Date: Mon, 25 Mar 2024 11:47:57 -0400 Subject: [PATCH 2/3] Addressed the comment --- .../test_lookup_tables_data_seed.py | 163 +++++++++++++++++- 1 file changed, 158 insertions(+), 5 deletions(-) diff --git a/tests/migrations/test_lookup_tables_data_seed.py b/tests/migrations/test_lookup_tables_data_seed.py index 6baf727..6ad046c 100644 --- a/tests/migrations/test_lookup_tables_data_seed.py +++ b/tests/migrations/test_lookup_tables_data_seed.py @@ -112,16 +112,169 @@ def test_denied_domains_data_seed(alembic_runner: MigrationContext, alembic_engi # Migrate up to, but not including this new migration alembic_runner.migrate_up_before("d6e4a13fbebd") + denied_domains_inserted = [ + ("aol.com"), + ("att.net"), + ("comcast.net"), + ("facebook.com"), + ("gmail.com"), + ("gmx.com"), + ("googlemail.com"), + ("google.com"), + ("hotmail.com"), + ("hotmail.co.uk"), + ("mac.com"), + ("me.com"), + ("mail.com"), + ("msn.com"), + ("live.com"), + ("sbcglobal.net"), + ("verizon.net"), + ("yahoo.com"), + ("yahoo.co.uk"), + ("email.com"), + ("fastmail.fm"), + ("games.com"), + ("gmx.net"), + ("hush.com"), + ("hushmail.com"), + ("icloud.com"), + ("iname.com"), + ("inbox.com"), + ("lavabit.com"), + ("love.com"), + ("outlook.com"), + ("pobox.com"), + ("protonmail.ch"), + ("protonmail.com"), + ("tutanota.de"), + ("tutanota.com"), + ("tutamail.com"), + ("tuta.io"), + ("keemail.me"), + ("rocketmail.com"), + ("safe-mail.net"), + ("wow.com,ygm.com"), + ("ymail.com"), + ("zoho.com"), + ("yandex.com"), + ("bellsouth.net"), + ("charter.net"), + ("cox.net"), + ("earthlink.net"), + ("juno.com"), + ("btinternet.com"), + ("virginmedia.com"), + ("blueyonder.co.uk"), + ("freeserve.co.uk"), + ("live.co.uk"), + ("ntlworld.com"), + ("o2.co.uk"), + ("orange.net"), + ("sky.com"), + ("talktalk.co.uk"), + ("tiscali.co.uk"), + ("virgin.net"), + ("wanadoo.co.uk"), + ("bt.com"), + ("sina.com"), + ("sina.cn"), + ("qq.com"), + ("naver.com"), + ("hanmail.net"), + ("daum.net"), + ("nate.com"), + ("yahoo.co.jp"), + ("yahoo.co.kr"), + ("yahoo.co.id"), + ("yahoo.co.in"), + ("yahoo.com.sg"), + ("yahoo.com.ph"), + ("163.com"), + ("yeah.net"), + ("126.com"), + ("21cn.com"), + ("aliyun.com"), + ("foxmail.com"), + ("hotmail.fr"), + ("live.fr"), + ("laposte.net"), + ("yahoo.fr"), + ("wanadoo.fr"), + ("orange.fr"), + ("gmx.fr"), + ("sfr.fr"), + ("neuf.fr"), + ("free.fr"), + ("gmx.de"), + ("hotmail.de"), + ("live.de"), + ("online.de"), + ("t-online.de"), + ("web.de"), + ("yahoo.de"), + ("libero.it"), + ("virgilio.it"), + ("hotmail.it"), + ("aol.it"), + ("tiscali.it"), + ("alice.it"), + ("live.it"), + ("yahoo.it"), + ("email.it"), + ("tin.it"), + ("poste.it"), + ("teletu.it"), + ("mail.ru"), + ("rambler.ru"), + ("yandex.ru"), + ("ya.ru"), + ("list.ru"), + ("hotmail.be"), + ("live.be"), + ("skynet.be"), + ("voo.be"), + ("tvcablenet.be"), + ("telenet.be"), + ("hotmail.com.ar"), + ("live.com.ar"), + ("yahoo.com.ar"), + ("fibertel.com.ar"), + ("speedy.com.ar"), + ("arnet.com.ar"), + ("yahoo.com.mx"), + ("live.com.mx"), + ("hotmail.es"), + ("hotmail.com.mx"), + ("prodigy.net.mx"), + ("yahoo.ca"), + ("hotmail.ca"), + ("bell.net"), + ("shaw.ca"), + ("sympatico.ca"), + ("rogers.com"), + ("yahoo.com.br"), + ("hotmail.com.br"), + ("outlook.com.br"), + ("uol.com.br"), + ("bol.com.br"), + ("terra.com.br"), + ("ig.com.br"), + ("itelefonica.com.br"), + ("r7.com"), + ("zipmail.com.br"), + ("globo.com"), + ("globomail.com"), + ("oi.com.br"), + ] + # Test denied_domains seed denied_domain_tablename = "denied_domains" alembic_runner.migrate_up_one() with alembic_engine.connect() as conn: - denied_domains_rows = conn.execute( - text("SELECT domain from %s where domain = :domain " % denied_domain_tablename), (dict(domain="yahoo.fr")) - ).fetchall() - denied_domains_expected = [("yahoo.fr",)] + denied_domains_rows = conn.execute(text("SELECT * FROM %s" % denied_domain_tablename)).fetchall() - assert denied_domains_rows == denied_domains_expected + assert [elem[0] for elem in denied_domains_rows] == denied_domains_inserted alembic_runner.migrate_down_one() with alembic_engine.connect() as conn: From f3f1e5558b57223c0fb7807af465487b89a9377d Mon Sep 17 00:00:00 2001 From: Nargis Sultani Date: Tue, 26 Mar 2024 12:57:49 -0400 Subject: [PATCH 3/3] sorted the seed data alphabetically --- .../d6e4a13fbebd_seed_denied_domains_table.py | 240 +++++++++--------- .../test_lookup_tables_data_seed.py | 240 +++++++++--------- 2 files changed, 240 insertions(+), 240 deletions(-) diff --git a/db_revisions/versions/d6e4a13fbebd_seed_denied_domains_table.py b/db_revisions/versions/d6e4a13fbebd_seed_denied_domains_table.py index 5988fac..d965c15 100644 --- a/db_revisions/versions/d6e4a13fbebd_seed_denied_domains_table.py +++ b/db_revisions/versions/d6e4a13fbebd_seed_denied_domains_table.py @@ -19,159 +19,159 @@ depends_on: Union[str, Sequence[str], None] = None seed_data = [ + {"domain": "126.com"}, + {"domain": "163.com"}, + {"domain": "21cn.com"}, + {"domain": "alice.it"}, + {"domain": "aliyun.com"}, {"domain": "aol.com"}, + {"domain": "aol.it"}, + {"domain": "arnet.com.ar"}, {"domain": "att.net"}, + {"domain": "bell.net"}, + {"domain": "bellsouth.net"}, + {"domain": "blueyonder.co.uk"}, + {"domain": "bol.com.br"}, + {"domain": "bt.com"}, + {"domain": "btinternet.com"}, + {"domain": "charter.net"}, {"domain": "comcast.net"}, + {"domain": "cox.net"}, + {"domain": "daum.net"}, + {"domain": "earthlink.net"}, + {"domain": "email.com"}, + {"domain": "email.it"}, {"domain": "facebook.com"}, + {"domain": "fastmail.fm"}, + {"domain": "fibertel.com.ar"}, + {"domain": "foxmail.com"}, + {"domain": "free.fr"}, + {"domain": "freeserve.co.uk"}, + {"domain": "games.com"}, + {"domain": "globo.com"}, + {"domain": "globomail.com"}, {"domain": "gmail.com"}, {"domain": "gmx.com"}, - {"domain": "googlemail.com"}, + {"domain": "gmx.de"}, + {"domain": "gmx.fr"}, + {"domain": "gmx.net"}, {"domain": "google.com"}, - {"domain": "hotmail.com"}, + {"domain": "googlemail.com"}, + {"domain": "hanmail.net"}, + {"domain": "hotmail.be"}, + {"domain": "hotmail.ca"}, {"domain": "hotmail.co.uk"}, - {"domain": "mac.com"}, - {"domain": "me.com"}, - {"domain": "mail.com"}, - {"domain": "msn.com"}, - {"domain": "live.com"}, - {"domain": "sbcglobal.net"}, - {"domain": "verizon.net"}, - {"domain": "yahoo.com"}, - {"domain": "yahoo.co.uk"}, - {"domain": "email.com"}, - {"domain": "fastmail.fm"}, - {"domain": "games.com"}, - {"domain": "gmx.net"}, + {"domain": "hotmail.com.ar"}, + {"domain": "hotmail.com.br"}, + {"domain": "hotmail.com.mx"}, + {"domain": "hotmail.com"}, + {"domain": "hotmail.de"}, + {"domain": "hotmail.es"}, + {"domain": "hotmail.fr"}, + {"domain": "hotmail.it"}, {"domain": "hush.com"}, {"domain": "hushmail.com"}, {"domain": "icloud.com"}, + {"domain": "ig.com.br"}, {"domain": "iname.com"}, {"domain": "inbox.com"}, + {"domain": "itelefonica.com.br"}, + {"domain": "juno.com"}, + {"domain": "keemail.me"}, + {"domain": "laposte.net"}, {"domain": "lavabit.com"}, + {"domain": "libero.it"}, + {"domain": "list.ru"}, + {"domain": "live.be"}, + {"domain": "live.co.uk"}, + {"domain": "live.com.ar"}, + {"domain": "live.com.mx"}, + {"domain": "live.com"}, + {"domain": "live.de"}, + {"domain": "live.fr"}, + {"domain": "live.it"}, {"domain": "love.com"}, + {"domain": "mac.com"}, + {"domain": "mail.com"}, + {"domain": "mail.ru"}, + {"domain": "me.com"}, + {"domain": "msn.com"}, + {"domain": "nate.com"}, + {"domain": "naver.com"}, + {"domain": "neuf.fr"}, + {"domain": "ntlworld.com"}, + {"domain": "o2.co.uk"}, + {"domain": "oi.com.br"}, + {"domain": "online.de"}, + {"domain": "orange.fr"}, + {"domain": "orange.net"}, + {"domain": "outlook.com.br"}, {"domain": "outlook.com"}, {"domain": "pobox.com"}, + {"domain": "poste.it"}, + {"domain": "prodigy.net.mx"}, {"domain": "protonmail.ch"}, {"domain": "protonmail.com"}, - {"domain": "tutanota.de"}, - {"domain": "tutanota.com"}, - {"domain": "tutamail.com"}, - {"domain": "tuta.io"}, - {"domain": "keemail.me"}, + {"domain": "qq.com"}, + {"domain": "r7.com"}, + {"domain": "rambler.ru"}, {"domain": "rocketmail.com"}, + {"domain": "rogers.com"}, {"domain": "safe-mail.net"}, - {"domain": "wow.com,ygm.com"}, - {"domain": "ymail.com"}, - {"domain": "zoho.com"}, - {"domain": "yandex.com"}, - {"domain": "bellsouth.net"}, - {"domain": "charter.net"}, - {"domain": "cox.net"}, - {"domain": "earthlink.net"}, - {"domain": "juno.com"}, - {"domain": "btinternet.com"}, - {"domain": "virginmedia.com"}, - {"domain": "blueyonder.co.uk"}, - {"domain": "freeserve.co.uk"}, - {"domain": "live.co.uk"}, - {"domain": "ntlworld.com"}, - {"domain": "o2.co.uk"}, - {"domain": "orange.net"}, + {"domain": "sbcglobal.net"}, + {"domain": "sfr.fr"}, + {"domain": "shaw.ca"}, + {"domain": "sina.cn"}, + {"domain": "sina.com"}, {"domain": "sky.com"}, + {"domain": "skynet.be"}, + {"domain": "speedy.com.ar"}, + {"domain": "sympatico.ca"}, + {"domain": "t-online.de"}, {"domain": "talktalk.co.uk"}, + {"domain": "telenet.be"}, + {"domain": "teletu.it"}, + {"domain": "terra.com.br"}, + {"domain": "tin.it"}, {"domain": "tiscali.co.uk"}, + {"domain": "tiscali.it"}, + {"domain": "tuta.io"}, + {"domain": "tutamail.com"}, + {"domain": "tutanota.com"}, + {"domain": "tutanota.de"}, + {"domain": "tvcablenet.be"}, + {"domain": "uol.com.br"}, + {"domain": "verizon.net"}, + {"domain": "virgilio.it"}, {"domain": "virgin.net"}, + {"domain": "virginmedia.com"}, + {"domain": "voo.be"}, {"domain": "wanadoo.co.uk"}, - {"domain": "bt.com"}, - {"domain": "sina.com"}, - {"domain": "sina.cn"}, - {"domain": "qq.com"}, - {"domain": "naver.com"}, - {"domain": "hanmail.net"}, - {"domain": "daum.net"}, - {"domain": "nate.com"}, - {"domain": "yahoo.co.jp"}, - {"domain": "yahoo.co.kr"}, + {"domain": "wanadoo.fr"}, + {"domain": "web.de"}, + {"domain": "wow.com,ygm.com"}, + {"domain": "ya.ru"}, + {"domain": "yahoo.ca"}, {"domain": "yahoo.co.id"}, {"domain": "yahoo.co.in"}, - {"domain": "yahoo.com.sg"}, + {"domain": "yahoo.co.jp"}, + {"domain": "yahoo.co.kr"}, + {"domain": "yahoo.co.uk"}, + {"domain": "yahoo.com.ar"}, + {"domain": "yahoo.com.br"}, + {"domain": "yahoo.com.mx"}, {"domain": "yahoo.com.ph"}, - {"domain": "163.com"}, - {"domain": "yeah.net"}, - {"domain": "126.com"}, - {"domain": "21cn.com"}, - {"domain": "aliyun.com"}, - {"domain": "foxmail.com"}, - {"domain": "hotmail.fr"}, - {"domain": "live.fr"}, - {"domain": "laposte.net"}, - {"domain": "yahoo.fr"}, - {"domain": "wanadoo.fr"}, - {"domain": "orange.fr"}, - {"domain": "gmx.fr"}, - {"domain": "sfr.fr"}, - {"domain": "neuf.fr"}, - {"domain": "free.fr"}, - {"domain": "gmx.de"}, - {"domain": "hotmail.de"}, - {"domain": "live.de"}, - {"domain": "online.de"}, - {"domain": "t-online.de"}, - {"domain": "web.de"}, + {"domain": "yahoo.com.sg"}, + {"domain": "yahoo.com"}, {"domain": "yahoo.de"}, - {"domain": "libero.it"}, - {"domain": "virgilio.it"}, - {"domain": "hotmail.it"}, - {"domain": "aol.it"}, - {"domain": "tiscali.it"}, - {"domain": "alice.it"}, - {"domain": "live.it"}, + {"domain": "yahoo.fr"}, {"domain": "yahoo.it"}, - {"domain": "email.it"}, - {"domain": "tin.it"}, - {"domain": "poste.it"}, - {"domain": "teletu.it"}, - {"domain": "mail.ru"}, - {"domain": "rambler.ru"}, + {"domain": "yandex.com"}, {"domain": "yandex.ru"}, - {"domain": "ya.ru"}, - {"domain": "list.ru"}, - {"domain": "hotmail.be"}, - {"domain": "live.be"}, - {"domain": "skynet.be"}, - {"domain": "voo.be"}, - {"domain": "tvcablenet.be"}, - {"domain": "telenet.be"}, - {"domain": "hotmail.com.ar"}, - {"domain": "live.com.ar"}, - {"domain": "yahoo.com.ar"}, - {"domain": "fibertel.com.ar"}, - {"domain": "speedy.com.ar"}, - {"domain": "arnet.com.ar"}, - {"domain": "yahoo.com.mx"}, - {"domain": "live.com.mx"}, - {"domain": "hotmail.es"}, - {"domain": "hotmail.com.mx"}, - {"domain": "prodigy.net.mx"}, - {"domain": "yahoo.ca"}, - {"domain": "hotmail.ca"}, - {"domain": "bell.net"}, - {"domain": "shaw.ca"}, - {"domain": "sympatico.ca"}, - {"domain": "rogers.com"}, - {"domain": "yahoo.com.br"}, - {"domain": "hotmail.com.br"}, - {"domain": "outlook.com.br"}, - {"domain": "uol.com.br"}, - {"domain": "bol.com.br"}, - {"domain": "terra.com.br"}, - {"domain": "ig.com.br"}, - {"domain": "itelefonica.com.br"}, - {"domain": "r7.com"}, + {"domain": "yeah.net"}, + {"domain": "ymail.com"}, {"domain": "zipmail.com.br"}, - {"domain": "globo.com"}, - {"domain": "globomail.com"}, - {"domain": "oi.com.br"}, + {"domain": "zoho.com"}, ] diff --git a/tests/migrations/test_lookup_tables_data_seed.py b/tests/migrations/test_lookup_tables_data_seed.py index 6ad046c..753ffff 100644 --- a/tests/migrations/test_lookup_tables_data_seed.py +++ b/tests/migrations/test_lookup_tables_data_seed.py @@ -113,159 +113,159 @@ def test_denied_domains_data_seed(alembic_runner: MigrationContext, alembic_engi alembic_runner.migrate_up_before("d6e4a13fbebd") denied_domains_inserted = [ + ("126.com"), + ("163.com"), + ("21cn.com"), + ("alice.it"), + ("aliyun.com"), ("aol.com"), + ("aol.it"), + ("arnet.com.ar"), ("att.net"), + ("bell.net"), + ("bellsouth.net"), + ("blueyonder.co.uk"), + ("bol.com.br"), + ("bt.com"), + ("btinternet.com"), + ("charter.net"), ("comcast.net"), + ("cox.net"), + ("daum.net"), + ("earthlink.net"), + ("email.com"), + ("email.it"), ("facebook.com"), + ("fastmail.fm"), + ("fibertel.com.ar"), + ("foxmail.com"), + ("free.fr"), + ("freeserve.co.uk"), + ("games.com"), + ("globo.com"), + ("globomail.com"), ("gmail.com"), ("gmx.com"), - ("googlemail.com"), + ("gmx.de"), + ("gmx.fr"), + ("gmx.net"), ("google.com"), - ("hotmail.com"), + ("googlemail.com"), + ("hanmail.net"), + ("hotmail.be"), + ("hotmail.ca"), ("hotmail.co.uk"), - ("mac.com"), - ("me.com"), - ("mail.com"), - ("msn.com"), - ("live.com"), - ("sbcglobal.net"), - ("verizon.net"), - ("yahoo.com"), - ("yahoo.co.uk"), - ("email.com"), - ("fastmail.fm"), - ("games.com"), - ("gmx.net"), + ("hotmail.com.ar"), + ("hotmail.com.br"), + ("hotmail.com.mx"), + ("hotmail.com"), + ("hotmail.de"), + ("hotmail.es"), + ("hotmail.fr"), + ("hotmail.it"), ("hush.com"), ("hushmail.com"), ("icloud.com"), + ("ig.com.br"), ("iname.com"), ("inbox.com"), + ("itelefonica.com.br"), + ("juno.com"), + ("keemail.me"), + ("laposte.net"), ("lavabit.com"), + ("libero.it"), + ("list.ru"), + ("live.be"), + ("live.co.uk"), + ("live.com.ar"), + ("live.com.mx"), + ("live.com"), + ("live.de"), + ("live.fr"), + ("live.it"), ("love.com"), + ("mac.com"), + ("mail.com"), + ("mail.ru"), + ("me.com"), + ("msn.com"), + ("nate.com"), + ("naver.com"), + ("neuf.fr"), + ("ntlworld.com"), + ("o2.co.uk"), + ("oi.com.br"), + ("online.de"), + ("orange.fr"), + ("orange.net"), + ("outlook.com.br"), ("outlook.com"), ("pobox.com"), + ("poste.it"), + ("prodigy.net.mx"), ("protonmail.ch"), ("protonmail.com"), - ("tutanota.de"), - ("tutanota.com"), - ("tutamail.com"), - ("tuta.io"), - ("keemail.me"), + ("qq.com"), + ("r7.com"), + ("rambler.ru"), ("rocketmail.com"), + ("rogers.com"), ("safe-mail.net"), - ("wow.com,ygm.com"), - ("ymail.com"), - ("zoho.com"), - ("yandex.com"), - ("bellsouth.net"), - ("charter.net"), - ("cox.net"), - ("earthlink.net"), - ("juno.com"), - ("btinternet.com"), - ("virginmedia.com"), - ("blueyonder.co.uk"), - ("freeserve.co.uk"), - ("live.co.uk"), - ("ntlworld.com"), - ("o2.co.uk"), - ("orange.net"), + ("sbcglobal.net"), + ("sfr.fr"), + ("shaw.ca"), + ("sina.cn"), + ("sina.com"), ("sky.com"), + ("skynet.be"), + ("speedy.com.ar"), + ("sympatico.ca"), + ("t-online.de"), ("talktalk.co.uk"), + ("telenet.be"), + ("teletu.it"), + ("terra.com.br"), + ("tin.it"), ("tiscali.co.uk"), + ("tiscali.it"), + ("tuta.io"), + ("tutamail.com"), + ("tutanota.com"), + ("tutanota.de"), + ("tvcablenet.be"), + ("uol.com.br"), + ("verizon.net"), + ("virgilio.it"), ("virgin.net"), + ("virginmedia.com"), + ("voo.be"), ("wanadoo.co.uk"), - ("bt.com"), - ("sina.com"), - ("sina.cn"), - ("qq.com"), - ("naver.com"), - ("hanmail.net"), - ("daum.net"), - ("nate.com"), - ("yahoo.co.jp"), - ("yahoo.co.kr"), + ("wanadoo.fr"), + ("web.de"), + ("wow.com,ygm.com"), + ("ya.ru"), + ("yahoo.ca"), ("yahoo.co.id"), ("yahoo.co.in"), - ("yahoo.com.sg"), + ("yahoo.co.jp"), + ("yahoo.co.kr"), + ("yahoo.co.uk"), + ("yahoo.com.ar"), + ("yahoo.com.br"), + ("yahoo.com.mx"), ("yahoo.com.ph"), - ("163.com"), - ("yeah.net"), - ("126.com"), - ("21cn.com"), - ("aliyun.com"), - ("foxmail.com"), - ("hotmail.fr"), - ("live.fr"), - ("laposte.net"), - ("yahoo.fr"), - ("wanadoo.fr"), - ("orange.fr"), - ("gmx.fr"), - ("sfr.fr"), - ("neuf.fr"), - ("free.fr"), - ("gmx.de"), - ("hotmail.de"), - ("live.de"), - ("online.de"), - ("t-online.de"), - ("web.de"), + ("yahoo.com.sg"), + ("yahoo.com"), ("yahoo.de"), - ("libero.it"), - ("virgilio.it"), - ("hotmail.it"), - ("aol.it"), - ("tiscali.it"), - ("alice.it"), - ("live.it"), + ("yahoo.fr"), ("yahoo.it"), - ("email.it"), - ("tin.it"), - ("poste.it"), - ("teletu.it"), - ("mail.ru"), - ("rambler.ru"), + ("yandex.com"), ("yandex.ru"), - ("ya.ru"), - ("list.ru"), - ("hotmail.be"), - ("live.be"), - ("skynet.be"), - ("voo.be"), - ("tvcablenet.be"), - ("telenet.be"), - ("hotmail.com.ar"), - ("live.com.ar"), - ("yahoo.com.ar"), - ("fibertel.com.ar"), - ("speedy.com.ar"), - ("arnet.com.ar"), - ("yahoo.com.mx"), - ("live.com.mx"), - ("hotmail.es"), - ("hotmail.com.mx"), - ("prodigy.net.mx"), - ("yahoo.ca"), - ("hotmail.ca"), - ("bell.net"), - ("shaw.ca"), - ("sympatico.ca"), - ("rogers.com"), - ("yahoo.com.br"), - ("hotmail.com.br"), - ("outlook.com.br"), - ("uol.com.br"), - ("bol.com.br"), - ("terra.com.br"), - ("ig.com.br"), - ("itelefonica.com.br"), - ("r7.com"), + ("yeah.net"), + ("ymail.com"), ("zipmail.com.br"), - ("globo.com"), - ("globomail.com"), - ("oi.com.br"), + ("zoho.com"), ] # Test denied_domains seed