add test for new postcode import function

This commit is contained in:
Sarah Hoffmann
2021-04-16 15:37:53 +02:00
parent 886a01c796
commit 0f11e311c4
3 changed files with 52 additions and 3 deletions

View File

@@ -33,8 +33,6 @@ class _TestingCursor(psycopg2.extras.DictCursor):
""" Execute a query and return the result as a set of tuples.
"""
self.execute(sql, params)
if self.rowcount == 1:
return set(tuple(self.fetchone()))
return set((tuple(row) for row in self))