Example #1
0
from argos.web import api, front

app = front.create_app()

# Run!
if __name__ == '__main__':
    app.run(host='0.0.0.0')
Example #2
0
from argos.datastore import db
from argos.tasks import workers

from tests.patches import patch_knowledge, patch_concepts, patch_aws
from tests import helpers

import numpy as np
np.seterr(invalid='ignore')

test_config = {
        'SQLALCHEMY_DATABASE_URI': 'postgresql://*****:*****@localhost:5432/argos_test'
}

bare_app = web.create_app(**test_config)
api_app = api.create_app(**test_config)
front_app = front.create_app(**test_config)

for app in [api_app, front_app]:
    app.register_blueprint(helpers.blueprint)


class RequiresMocks(unittest.TestCase):
    def create_patch(self, name, **kwargs):
        """
        Helper for patching/mocking methods.

        Args:
            | name (str)       -- the 'module.package.method' to mock.
        """
        patcher = patch(name, autospec=True, **kwargs)
        thing = patcher.start()