diff --git a/golem/TERMS.html b/golem/TERMS.html index 46d43f4e79..4a5ffe6186 100644 --- a/golem/TERMS.html +++ b/golem/TERMS.html @@ -370,7 +370,7 @@
The processing of the information by storing and publishing the External - Statistics on the external network monitor is based on the user’s consent + Statistics on the external network monitor is based on the user's consent pursuant to Article 6(1) lit. a GDPR. The user shall have the right to withdraw his or her consent at any time. If the user wishes to end his or her contribution of External Statistics to the external network monitor, @@ -447,7 +447,7 @@
The processing of the information by storing the Internal Statistics on - the internal network monitor is based on the user’s consent pursuant to + the internal network monitor is based on the user's consent pursuant to Article 6(1) lit. a GDPR. The user shall have the right to withdraw his or her consent at any time. If the user wishes to end his or her contribution of information to the network monitor, he or she can opt out by using the @@ -511,7 +511,7 @@
@@ -537,7 +537,7 @@
The processing of the information by storing the Error Information on the - servers of the Company is based on the user’s consent pursuant to + servers of the Company is based on the user's consent pursuant to Article 6(1) lit. a GDPR. The user shall have the right to withdraw his or her consent at any time. If the user wishes to end his or her contribution of information to the network monitor, he or she can opt out by using the diff --git a/tests/golem/test_terms.py b/tests/golem/test_terms.py index 590edaba78..f0cfce1c2d 100644 --- a/tests/golem/test_terms.py +++ b/tests/golem/test_terms.py @@ -1,4 +1,6 @@ import pathlib +import re +import unittest from unittest.mock import patch from faker import Faker @@ -64,3 +66,28 @@ def test_show(self, read_mock): """ read_mock.return_value = content self.assertEqual(self.terms.show(), content) + + +class TermsOfUseContentsTest(unittest.TestCase): + def assertContentsValid(self, contents): + matched = re.search( + r"([^a-zA-Z0-9_\n\<\>\/\.\:\"\=\x20\(\)\,\;\'\-\%])", + contents, flags=re.DOTALL) + + try: + bad_char = matched.group(1) + except AttributeError: + bad_char = '' + + self.assertFalse( + matched, + msg="Found unacceptable character {} ({})".format( + bad_char, bad_char.encode('utf-8').hex() + ) + ) + + def test_tos_contents_valid(self): + self.assertContentsValid(terms.TermsOfUse.show()) + + def test_concent_tos_contents_valid(self): + self.assertContentsValid(terms.ConcentTermsOfUse.show())