This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psycopg2.extras | |
import sqlalchemy.dialects.postgresql | |
from sqlalchemy.types import TypeEngine | |
from sqlalchemy.types import String | |
from sqlalchemy.types import TypeDecorator | |
import uuid | |
# Required for PostgreSQL to accept UUID type. | |
psycopg2.extras.register_uuid() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def DictionaryMock(_sample_dict, methods=None): | |
""" A mock dictionary. | |
Makes it easier to check that the correct values are being retrieved | |
from a dictionary. | |
'_sample_dict': A dictionary of test values. Dictionary lookups will get | |
values from this dictionary. """ | |
if methods is None: | |
methods = [ |