Repository: mdn/kuma

Issue:
Update Jenkins build pipeline to remove tests for PR
**Summary**
The default pipeline (any pushes to branch) will trigger a python unit test and npm tests using `docker-compose`, we should stop doing this since we are already doing this in travis. So before a PR even gets merged it has already passed tests using travis so I feel we should just remove that extra job on the jenkins side of things

**Rationale**
It speeds up builds on PRs and also fixes an issue with jenkins where network port collision can happen when multiple builds are running at the same time.

**Audience**
Only Developers and SRE's will see this change


Our flake8 tests suddenly failed
**Summary**
Builds from `master` currently fail in Python linting. 
It's because the version of [flake8 used in TravisCI](https://github.com/mdn/kuma/blob/59afefbe55ca8456203baa96ba421f1fa3b63ede/.travis.yml#L17-L18) don't match what we have in our pyproject.toml. 
Today a new release of flake8 came out that broke our master. [Example](https://travis-ci.com/github/mdn/kuma/jobs/332498567)



Discussion:

Resolving patch:
diff --git a/kuma/search/views.py b/kuma/search/views.py
--- a/kuma/search/views.py
+++ b/kuma/search/views.py
@@ -11,6 +11,7 @@
 
 from .search import SearchView
 
+
 # Since the search endpoint accepts user input (via query parameters) and its
 # response is compressed, use rate limiting to mitigate the BREACH attack
 # (see http://breachattack.com/). It still needs to allow a user to click
diff --git a/kuma/users/models.py b/kuma/users/models.py
--- a/kuma/users/models.py
+++ b/kuma/users/models.py
@@ -199,7 +199,7 @@ def get_recovery_url(self):
 
     def set_next_subscriber_number_and_save(self):
         assert not self.subscriber_number, "already set"
-        lock_key = f"set_next_subscriber_number_and_save"
+        lock_key = "set_next_subscriber_number_and_save"
         # By locking "globally", we get to be certain that our query to get
         # the current highest `subscriber_number`, gets done alone.
         with cache.lock(lock_key):


Test patch:
diff --git a/kuma/authkeys/tests/test_views.py b/kuma/authkeys/tests/test_views.py
--- a/kuma/authkeys/tests/test_views.py
+++ b/kuma/authkeys/tests/test_views.py
@@ -110,8 +110,8 @@ def test_key_history(self):
             log_lines.append(("ping", self.user2, "Number #%s" % i))
 
         # Record the log lines for this key
-        for l in log_lines:
-            self.key1.log(*l)
+        for log_line in log_lines:
+            self.key1.log(*log_line)
 
         # Reverse the lines for comparison.
         log_lines.reverse()
diff --git a/kuma/wiki/tests/test_ssr.py b/kuma/wiki/tests/test_ssr.py
--- a/kuma/wiki/tests/test_ssr.py
+++ b/kuma/wiki/tests/test_ssr.py
@@ -59,16 +59,10 @@ def test_server_side_render(
     output = ssr.render_react("SPA", locale, path, document_data)
 
     # Make sure the output is as expected
-    data = {
-        "locale": locale,
-        "url": path,
-        "stringCatalog": localization_data["catalog"],
-        "documentData": document_data,
-    }
     expect = (
-        '<div id="react-container" data-component-name="{}">{}</div>\n'
+        f'<div id="react-container" data-component-name="SPA">{mock_html}</div>\n'
         "<script>window._react_data = JSON.parse(STUFF);</script>\n"
-    ).format("SPA", mock_html, json.dumps(data))
+    )
     assert output == expect