gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-bank] 09/09: remove initial checks. They pollute tes


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] 09/09: remove initial checks. They pollute tests, and the way the bank is launched makes sure they always pass. Moreover, they check for obvious conditions like: is a 'Bank' user present? Is a database accessible?
Date: Tue, 05 Dec 2017 13:21:51 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository bank.

commit 3d1d4bb1c35c86297bb4eff44da9de6205314c4c
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Dec 5 13:16:40 2017 +0100

    remove initial checks.  They pollute tests, and the way the
    bank is launched makes sure they always pass.  Moreover, they
    check for obvious conditions like: is a 'Bank' user present?
    Is a database accessible?
    
    NOTE: Django does not let one disable checks for tests, but
    only *silence* them, which is still wasteful.
---
 talerbank/app/__init__.py |  2 --
 talerbank/app/checks.py   | 15 ---------------
 2 files changed, 17 deletions(-)

diff --git a/talerbank/app/__init__.py b/talerbank/app/__init__.py
index ecc3dff..e69de29 100644
--- a/talerbank/app/__init__.py
+++ b/talerbank/app/__init__.py
@@ -1,2 +0,0 @@
-# make sure that checks are registered
-from . import checks
diff --git a/talerbank/app/checks.py b/talerbank/app/checks.py
deleted file mode 100644
index 3b505bb..0000000
--- a/talerbank/app/checks.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from django.core.checks import register, Warning
-from django.db.utils import OperationalError
-
address@hidden()
-def example_check(app_configs, **kwargs):
-    errors = []
-    try:
-        from .models import User
-        User.objects.get(username='Bank')
-    except User.DoesNotExist:
-        errors.append(Warning("The bank user does not exist, run the \
-                              'provide_accounts' management command."))
-    except OperationalError:
-        errors.append(Warning("Presumably non existent database."))
-    return errors

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]