[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
- [GNUnet-SVN] [taler-bank] branch master updated (c8f9b7a -> 3d1d4bb), gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 04/09: remove fixme, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 02/09: provide __str__ to custom exceptions, gnunet, 2017/12/05
- [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?,
gnunet <=
- [GNUnet-SVN] [taler-bank] 03/09: linting, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 07/09: default log level = warning, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 05/09: done linting talerconfig, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 08/09: linting models. WARNING/NOTE: tests passed but this change altered - although did NOT break - the recommended way to use the model API., gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 01/09: port to django2, gnunet, 2017/12/05
- [GNUnet-SVN] [taler-bank] 06/09: linting done with views, gnunet, 2017/12/05