diff --git a/tests/etl/test_classification_mirroring.py b/tests/etl/test_classification_mirroring.py index 82ecd734bf0..b18b0140d61 100644 --- a/tests/etl/test_classification_mirroring.py +++ b/tests/etl/test_classification_mirroring.py @@ -7,7 +7,7 @@ from datadiff import diff from django.conf import settings -from treeherder.etl.classification_mirroring import OrangeFactorBugRequest, BugzillaBugRequest +from treeherder.etl.classification_mirroring import ElasticsearchDocRequest, BugzillaCommentRequest def test_tbpl_bug_request_body(jm, eleven_jobs_processed): @@ -29,8 +29,7 @@ def test_tbpl_bug_request_body(jm, eleven_jobs_processed): submit_timestamp = int(time()) who = "user@mozilla.com" - req = OrangeFactorBugRequest(jm.project, job_id, - bug_id, submit_timestamp, who) + req = ElasticsearchDocRequest(jm.project, job_id, bug_id, submit_timestamp, who) req.generate_request_body() expected = { @@ -72,7 +71,7 @@ def test_tbpl_bugzilla_request_body(jm, eleven_jobs_processed): ] jm.store_job_artifact([bug_suggestions_placeholders]) - req = BugzillaBugRequest(jm.project, job_id, bug_id, who) + req = BugzillaCommentRequest(jm.project, job_id, bug_id, who) req.generate_request_body() expected = { @@ -112,7 +111,7 @@ def test_tbpl_bugzilla_comment_length_capped(jm, eleven_jobs_processed): ] jm.store_job_artifact([bug_suggestions_placeholders]) - req = BugzillaBugRequest(jm.project, job_id, bug_id, who) + req = BugzillaCommentRequest(jm.project, job_id, bug_id, who) req.generate_request_body() assert len(req.body['comment']) == settings.BZ_MAX_COMMENT_LENGTH diff --git a/treeherder/etl/classification_mirroring.py b/treeherder/etl/classification_mirroring.py index 12037e347de..ea76f06d8ae 100644 --- a/treeherder/etl/classification_mirroring.py +++ b/treeherder/etl/classification_mirroring.py @@ -13,7 +13,7 @@ logger = logging.getLogger(__name__) -class OrangeFactorBugRequest(object): +class ElasticsearchDocRequest(object): def __init__(self, project, job_id, bug_id, submit_timestamp, who): self.project = project @@ -82,7 +82,7 @@ def send_request(self): raise -class BugzillaBugRequest(object): +class BugzillaCommentRequest(object): def __init__(self, project, job_id, bug_id, who): self.project = project diff --git a/treeherder/etl/tasks/classification_mirroring_tasks.py b/treeherder/etl/tasks/classification_mirroring_tasks.py index 4a3b57146d6..45340a5ad5a 100644 --- a/treeherder/etl/tasks/classification_mirroring_tasks.py +++ b/treeherder/etl/tasks/classification_mirroring_tasks.py @@ -6,7 +6,7 @@ This module contains """ from celery import task -from treeherder.etl.classification_mirroring import OrangeFactorBugRequest, BugzillaBugRequest +from treeherder.etl.classification_mirroring import ElasticsearchDocRequest, BugzillaCommentRequest @task(name="submit-star-comment", max_retries=10, time_limit=30) @@ -16,7 +16,7 @@ def submit_star_comment(project, job_id, bug_id, submit_timestamp, who): starcomment.php proxies then the request to orange factor """ try: - req = OrangeFactorBugRequest(project, job_id, bug_id, submit_timestamp, who) + req = ElasticsearchDocRequest(project, job_id, bug_id, submit_timestamp, who) req.generate_request_body() req.send_request() except Exception as e: @@ -35,7 +35,7 @@ def submit_bug_comment(project, job_id, bug_id, who): to add a new comment to the associated bug on bugzilla. """ try: - req = BugzillaBugRequest(project, job_id, bug_id, who) + req = BugzillaCommentRequest(project, job_id, bug_id, who) req.generate_request_body() req.send_request() except Exception as e: