This file contains hidden or 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 os | |
import pytest | |
from alembic.command import upgrade | |
from alembic.config import Config | |
from project.factory import create_app | |
from project.database import db as _db | |
This file contains hidden or 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
from UserDict import IterableUserDict | |
import collections | |
def tupperware(mapping): | |
""" Convert mappings to 'tupperwares' recursively. | |
Lets you use dicts like they're JavaScript Object Literals (~=JSON)... | |
It recursively turns mappings (dictionaries) into namedtuples. | |
Thus, you can cheaply create an object whose attributes are accessible |