diff options
author | Kevin Morris <kevr@0cost.org> | 2021-01-01 07:00:15 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2021-02-20 17:52:52 +0100 |
commit | a376020977085d08a49d427e6bf7c4266a7f6413 (patch) | |
tree | dc8279df67f0532b673138872800abd6e42592dc /aurweb/db.py | |
parent | 3b7ebc7693933a2520c50fa89296a77dad020f47 (diff) | |
download | aur-a376020977085d08a49d427e6bf7c4266a7f6413.tar.gz aur-a376020977085d08a49d427e6bf7c4266a7f6413.tar.xz |
add test_popupdate.py
We had no coverage over aurweb.scripts.popupdate. This test covers
all of its functionality.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Diffstat (limited to 'aurweb/db.py')
-rw-r--r-- | aurweb/db.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/aurweb/db.py b/aurweb/db.py index 02aeba38..8b9b8ada 100644 --- a/aurweb/db.py +++ b/aurweb/db.py @@ -1,3 +1,5 @@ +import math + try: import mysql.connector except ImportError: @@ -91,6 +93,7 @@ class Connection: elif aur_db_backend == 'sqlite': aur_db_name = aurweb.config.get('database', 'name') self._conn = sqlite3.connect(aur_db_name) + self._conn.create_function("POWER", 2, math.pow) self._paramstyle = sqlite3.paramstyle else: raise ValueError('unsupported database backend') |