From 53b1a6caf570f3d27d601e832714dec8abb56427 Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean@redhat.com>
Date: Oct 24 2017 19:55:17 +0000
Subject: Fix a spelling error.


Wow!

---

diff --git a/functional-tests/consumers/test_resultsdb.py b/functional-tests/consumers/test_resultsdb.py
index 9551019..206dd2c 100644
--- a/functional-tests/consumers/test_resultsdb.py
+++ b/functional-tests/consumers/test_resultsdb.py
@@ -59,7 +59,7 @@ def test_consume_new_result(
     old_decision = r.json()
 
     msg = {
-        'policies_satisified': False,
+        'policies_satisfied': False,
         'decision_context': 'bodhi_update_push_stable',
         'product_version': 'fedora-26',
         'unsatisfied_requirements': [
@@ -211,7 +211,7 @@ def test_invalidate_new_result_with_real_cache(
     assert r.status_code == 200
     response = r.json()
     # Ensure it is passing...
-    assert response['policies_satisified'], pprint.pformat(response)
+    assert response['policies_satisfied'], pprint.pformat(response)
 
     # Now, insert a new result and ensure that caching has made it such that
     # even though the new result fails, our decision still passes (bad)
@@ -223,7 +223,7 @@ def test_invalidate_new_result_with_real_cache(
     assert r.status_code == 200
     response = r.json()
     # Ensure it is passing...  BUT IT SHOULDN'T BE!
-    assert response['policies_satisified'], pprint.pformat(response)
+    assert response['policies_satisfied'], pprint.pformat(response)
 
     # Now, handle a message about the new failing result
     message = {
@@ -265,7 +265,7 @@ def test_invalidate_new_result_with_real_cache(
     assert r.status_code == 200
     response = r.json()
     # Ensure it is failing -- as it should be.
-    assert not response['policies_satisified'], pprint.pformat(response)
+    assert not response['policies_satisfied'], pprint.pformat(response)
 
 
 @mock.patch('greenwave.consumers.resultsdb.fedmsg.config.load_config')
diff --git a/functional-tests/consumers/test_waiverdb.py b/functional-tests/consumers/test_waiverdb.py
index 5b0ff5a..456e4d3 100644
--- a/functional-tests/consumers/test_waiverdb.py
+++ b/functional-tests/consumers/test_waiverdb.py
@@ -64,7 +64,7 @@ def test_consume_new_waiver(
     assert old_decision['summary'] == '1 of 3 required tests failed'
 
     msg = {
-        'policies_satisified': True,
+        'policies_satisfied': True,
         'decision_context': 'bodhi_update_push_stable',
         'unsatisfied_requirements': [],
         'summary': 'all required tests passed',
diff --git a/functional-tests/test_api_v1.py b/functional-tests/test_api_v1.py
index 98b27fd..089726f 100644
--- a/functional-tests/test_api_v1.py
+++ b/functional-tests/test_api_v1.py
@@ -198,7 +198,7 @@ def test_make_a_decison_on_passed_result(requests_session, greenwave_server, tes
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
     assert res_data['applicable_policies'] == ['1']
     expected_summary = 'all required tests passed'
     assert res_data['summary'] == expected_summary
@@ -227,7 +227,7 @@ def test_make_a_decison_on_failed_result_with_waiver(
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
     assert res_data['applicable_policies'] == ['1']
     expected_summary = 'all required tests passed'
     assert res_data['summary'] == expected_summary
@@ -248,7 +248,7 @@ def test_make_a_decison_on_failed_result(requests_session, greenwave_server, tes
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is False
+    assert res_data['policies_satisfied'] is False
     assert res_data['applicable_policies'] == ['1']
     expected_summary = '1 of 71 required tests failed'
     assert res_data['summary'] == expected_summary
@@ -281,7 +281,7 @@ def test_make_a_decison_on_no_results(requests_session, greenwave_server, testda
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is False
+    assert res_data['policies_satisfied'] is False
     assert res_data['applicable_policies'] == ['1']
     expected_summary = 'no test results found'
     assert res_data['summary'] == expected_summary
@@ -308,7 +308,7 @@ def test_unrestricted_policy_is_always_satisfied(
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
     assert res_data['applicable_policies'] == ['errata-unrestricted']
     expected_summary = 'no tests are required'
     assert res_data['summary'] == expected_summary
@@ -332,7 +332,7 @@ def test_bodhi_push_update_stable_policy(
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
     assert 'taskotron_release_critical_tasks' in res_data['applicable_policies']
     assert 'taskotron_release_critical_tasks_with_blacklist' in res_data['applicable_policies']
     expected_summary = 'all required tests passed'
@@ -370,7 +370,7 @@ def test_multiple_results_in_a_subject(
     assert r.status_code == 200
     res_data = r.json()
     # The failed result should be taken into account.
-    assert res_data['policies_satisified'] is False
+    assert res_data['policies_satisfied'] is False
     assert 'taskotron_release_critical_tasks' in res_data['applicable_policies']
     assert 'taskotron_release_critical_tasks_with_blacklist' in res_data['applicable_policies']
     assert res_data['summary'] == '1 of 3 required tests failed'
@@ -408,7 +408,7 @@ def test_ignore_result(requests_session, greenwave_server, testdatabuilder):
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
     # Ignore one passing result
     data.update({
         'ignore_result': [result['id']]
@@ -425,7 +425,7 @@ def test_ignore_result(requests_session, greenwave_server, testdatabuilder):
     ]
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is False
+    assert res_data['policies_satisfied'] is False
     assert res_data['unsatisfied_requirements'] == expected_unsatisfied_requirements
 
 
@@ -451,7 +451,7 @@ def test_make_a_decison_on_passed_result_with_scenario(
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
     assert res_data['applicable_policies'] == ['openqa_important_stuff_for_rawhide']
     expected_summary = 'all required tests passed'
     assert res_data['summary'] == expected_summary
@@ -485,7 +485,7 @@ def test_make_a_decison_on_failing_result_with_scenario(
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is False
+    assert res_data['policies_satisfied'] is False
     assert res_data['applicable_policies'] == ['openqa_important_stuff_for_rawhide']
     expected_summary = '1 of 2 required tests failed'
     assert res_data['summary'] == expected_summary
@@ -515,7 +515,7 @@ def test_ignore_waiver(requests_session, greenwave_server, testdatabuilder):
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
     # Ignore the waiver
     data.update({
         'ignore_waiver': [waiver['id']]
@@ -533,7 +533,7 @@ def test_ignore_waiver(requests_session, greenwave_server, testdatabuilder):
             'type': 'test-result-failed'
         },
     ]
-    assert res_data['policies_satisified'] is False
+    assert res_data['policies_satisfied'] is False
     assert res_data['unsatisfied_requirements'] == expected_unsatisfied_requirements
 
 
@@ -562,7 +562,7 @@ def test_cached_false_positive(requests_session, cached_greenwave_server, testda
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
 
     # Now, insert a *failing* result.  The cache should return the old results
     # that exclude the failing one (erroneously).
@@ -574,7 +574,7 @@ def test_cached_false_positive(requests_session, cached_greenwave_server, testda
                               data=json.dumps(data))
     assert r.status_code == 200
     res_data = r.json()
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
 
 
 def test_blacklist(requests_session, greenwave_server, testdatabuilder):
@@ -601,4 +601,4 @@ def test_blacklist(requests_session, greenwave_server, testdatabuilder):
     res_data = r.json()
     # the failed test result of dist.abicheck should be ignored and thus the policy
     # is satisfied.
-    assert res_data['policies_satisified'] is True
+    assert res_data['policies_satisfied'] is True
diff --git a/greenwave/api_v1.py b/greenwave/api_v1.py
index 912fd1a..932b32c 100644
--- a/greenwave/api_v1.py
+++ b/greenwave/api_v1.py
@@ -137,7 +137,7 @@ def make_decision():
        Server: Werkzeug/0.12.1 Python/2.7.13
 
        {
-           "policies_satisified": false,
+           "policies_satisfied": false,
            "summary": "2 of 15 required tests failed",
            "applicable_policies": ["1"],
            "unsatisfied_requirements": [
@@ -210,7 +210,7 @@ def make_decision():
         for policy in applicable_policies:
             answers.extend(policy.check(item, results, waivers))
     res = {
-        'policies_satisified': all(answer.is_satisfied for answer in answers),
+        'policies_satisfied': all(answer.is_satisfied for answer in answers),
         'summary': summarize_answers(answers),
         'applicable_policies': [policy.id for policy in applicable_policies],
         'unsatisfied_requirements': [answer.to_json() for answer in answers

