From 656eac5dc3b4f76804b313192b7dbe0ae59a6305 Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Fri, 13 Dec 2019 13:40:34 +0100 Subject: [PATCH] [Tests] Mark whole browser test file for db usage --- biscuit/core/tests/browser/test_selenium.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/biscuit/core/tests/browser/test_selenium.py b/biscuit/core/tests/browser/test_selenium.py index 0ff3d2cf9..fcfa478a9 100644 --- a/biscuit/core/tests/browser/test_selenium.py +++ b/biscuit/core/tests/browser/test_selenium.py @@ -6,6 +6,9 @@ from django.urls import reverse import pytest + +pytestmark = pytest.mark.django_db + SeleniumTestCaseBase.external_host = os.environ.get("TEST_HOST", "") or None SeleniumTestCaseBase.browsers = list( filter(bool, os.environ.get("TEST_SELENIUM_BROWSERS", "").split(",")) @@ -27,13 +30,11 @@ class SeleniumTests(SeleniumTestCase): else: return False - @pytest.mark.django_db def test_index(self): self.selenium.get(self.live_server_url + "/") assert "BiscuIT" in self.selenium.title self._screenshot("index.png") - @pytest.mark.django_db def test_login_default_superuser(self): username = "admin" password = "admin" -- GitLab