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>
This commit is contained in:
Kevin Morris 2020-12-31 22:00:15 -08:00
parent 4b7609681d
commit 6d08789ac1
3 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,5 @@
import math
try:
import mysql.connector
except ImportError:
@ -95,6 +97,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')