def test_terms_of_service(self) -> None:
    user = self.example_user('hamlet')
    email = user.email
    self.login(email)
    for user_tos_version in [None, '1.1', '2.0.3.4']:
        user.tos_version = user_tos_version
        user.save()
        with self.settings(TERMS_OF_SERVICE='whatever'), self.settings(TOS_VERSION='99.99'):
            result = self.client_get('/', dict(stream='Denmark'))
        html = result.content.decode('utf-8')
        self.assertIn('There are new Terms of Service', html)
def test_terms_of_service(self) -> None:
    user = self.example_user('hamlet')
    email = user.email
    self.login(email)
    for user_tos_version in [None, '1.1', '2.0.3.4']:
        user.tos_version = user_tos_version
        user.save()
        with self.settings(TERMS_OF_SERVICE='whatever'), self.settings(TOS_VERSION='99.99'):
            result = self.client_get('/', dict(stream='Denmark'))
        html = result.content.decode('utf-8')
        self.assertIn('There are new Terms of Service', html)