Skip to content

Commit b450b60

Browse files
authored
Ignore POM micromasters programs (#3597)
1 parent 963b057 commit b450b60

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

learning_resources/etl/micromasters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
OFFERED_BY = {"code": OfferedBy.mitx.name}
2323
READABLE_ID_PREFIX = "micromasters-program-"
24-
IGNORE_URLS = re.compile(r"/(dedp|scm|fin)/")
24+
IGNORE_URLS = re.compile(r"/(dedp|scm|fin|pom)/")
2525

2626
log = logging.getLogger(__name__)
2727

learning_resources/etl/micromasters_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,14 @@ def test_micromasters_transform(mock_micromasters_data, missing_url):
193193
("http://example.com/scm/program/1/url", True),
194194
("http://example.com/fin/program/1/url", True),
195195
("http://example.com/finis/program/1/url", False),
196+
("http://example.com/pom/program/1/url", True),
197+
("http://example.com/pomelo/program/1/url", False),
196198
],
197199
)
198200
def test_micromasters_transform_ignores_urls(
199201
mock_micromasters_data, url, expected_excluded
200202
):
201-
"""Programs whose URL contains /dedp/ or /scm/ should be excluded"""
203+
"""Programs whose URL contains /dedp/, /scm/, /fin/, or /pom/ should be excluded"""
202204
# Drop the second program so only the program under test is considered
203205
mock_micromasters_data = mock_micromasters_data[:1]
204206
mock_micromasters_data[0]["programpage_url"] = url

0 commit comments

Comments
 (0)