def __getattr__(self, name): if not self._ag_data_access: from amgut.lib.data_access.ag_data_access import AGDataAccess print 'Connecting to postgres for amgut.connections.ag_data' self._ag_data_access = AGDataAccess() return getattr(self._ag_data_access, name)
def setUp(self): self.con = psycopg2.connect(user=AMGUT_CONFIG.user, password=AMGUT_CONFIG.password, database=AMGUT_CONFIG.database, host=AMGUT_CONFIG.host, port=AMGUT_CONFIG.port) self.data_access = AGDataAccess(self.con) self.data_access.ag_update_kit_password('test', AMGUT_CONFIG.badpassword) self.con.commit()
def setUp(self): self.ag_data = AGDataAccess()
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The American Gut Project Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ----------------------------------------------------------------------------- from amgut.lib.data_access.ag_data_access import AGDataAccess __all__ = ['AG_DATA_ACCESS'] PORTAL_TYPE = 'americangut' # Data Access AG_DATA_ACCESS = AGDataAccess()