Commit a3760209 authored by Kevin Morris's avatar Kevin Morris Committed by Lukas Fleischer
Browse files


We had no coverage over aurweb.scripts.popupdate. This test covers
all of its functionality.
Signed-off-by: Kevin Morris's avatarKevin Morris <>
parent 3b7ebc76
import math
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
raise ValueError('unsupported database backend')
......@@ -7,7 +7,6 @@ import aurweb.db
def main():
conn = aurweb.db.Connection()
conn.execute("UPDATE PackageBases SET NumVotes = (" +
"SELECT COUNT(*) FROM PackageVotes " +
"WHERE PackageVotes.PackageBaseID = PackageBases.ID)")
from aurweb.scripts import popupdate
def test_popupdate():
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment