From 201acc968694bb863eb9798cb2a0731a7e27290d Mon Sep 17 00:00:00 2001
From: Dominik George <nik@naturalnet.de>
Date: Thu, 5 Dec 2019 15:59:13 +0100
Subject: [PATCH] Explicitly stop postgres test database.

---
 pytest_django_testing_postgresql.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pytest_django_testing_postgresql.py b/pytest_django_testing_postgresql.py
index 7139b66..c6ed64e 100644
--- a/pytest_django_testing_postgresql.py
+++ b/pytest_django_testing_postgresql.py
@@ -12,3 +12,6 @@ _POSTGRESQL = Postgresql()
 def pytest_load_initial_conftests(early_config, parser, args):
     os.environ['DJANGO_SETTINGS_MODULE'] = early_config.getini('DJANGO_SETTINGS_MODULE')
     settings.DATABASES['default'] = parse(_POSTGRESQL.url())
+
+def pytest_unconfigure(config):
+    _POSTGRESQL.stop()
-- 
GitLab