Ejemplo n.º 1
0
def setup_module():
    database.setup()

    def insert_organization():
        with db_session:
            DatabaseOrganization(
                id="08dfdc7a-511f-4ff5-8eb9-cff3730d0357", name="test_organization1"
            )

    def insert_users():
        with db_session:
            DatabaseUser(
                id="a3b44076-4220-4e68-9388-112439ccb6f8",
                organization=UUID("08dfdc7a-511f-4ff5-8eb9-cff3730d0357"),
                username="******",
                password="******",  # noqa: E501
            )
            DatabaseUser(
                id="765900e1-0239-499a-99d7-618312f92823",
                organization=UUID("08dfdc7a-511f-4ff5-8eb9-cff3730d0357"),
                username="******",
                password="******",  # noqa: E501
            )

    insert_organization()
    insert_users()
def setup_module():
    database.setup()

    def insert_organizations():
        with db_session:
            DatabaseOrganization(
                id="a3b44076-4220-4e68-9388-112439ccb6f8",
                name="test_organization1",
                users=[],
            )
            DatabaseOrganization(
                id="765900e1-0239-499a-99d7-618312f92823",
                name="test_organization2",
                users=[],
            )

    insert_organizations()
Ejemplo n.º 3
0
def setup_module():
    database.setup()

    def insert_organization():
        with db_session:
            DatabaseOrganization(id="08dfdc7a-511f-4ff5-8eb9-cff3730d0357",
                                 name="test_organization1")

    def insert_users():
        with db_session:
            DatabaseUser(
                organization=UUID("08dfdc7a-511f-4ff5-8eb9-cff3730d0357"),
                id="a3b44076-4220-4e68-9388-112439ccb6f8",
                username="******",
                password=
                "******",  # noqa: E501
            )

    insert_organization()
    insert_users()
Ejemplo n.º 4
0
def start():
    """Connect to the database and run the app through Uvicorn"""

    database.setup()
    uvicorn.run("manatee.main:app", host=settings.API_HOST, port=settings.API_PORT)