From 1f950feee106ecfe0ac7b75b1e6e228dc847c849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 21 Feb 2020 15:14:24 +0200 Subject: [PATCH] Fix Matrix test case. --- hc/front/tests/test_add_matrix.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hc/front/tests/test_add_matrix.py b/hc/front/tests/test_add_matrix.py index 0927d7bc..980cb79b 100644 --- a/hc/front/tests/test_add_matrix.py +++ b/hc/front/tests/test_add_matrix.py @@ -1,3 +1,4 @@ +from django.test.utils import override_settings from hc.api.models import Channel from hc.test import BaseTestCase from mock import patch @@ -8,11 +9,14 @@ class AddMatrixTestCase(BaseTestCase): super(AddMatrixTestCase, self).setUp() self.url = "/projects/%s/add_matrix/" % self.project.code + @override_settings(MATRIX_ACCESS_TOKEN="foo") def test_instructions_work(self): self.client.login(username="alice@example.org", password="password") r = self.client.get(self.url) self.assertContains(r, "Integration Settings", status_code=200) + @override_settings(MATRIX_ACCESS_TOKEN="foo") + @override_settings(MATRIX_HOMESERVER="fake-homeserver") @patch("hc.front.forms.requests.post") def test_it_works(self, mock_post): mock_post.return_value.json.return_value = {"room_id": "fake-room-id"}