def setUp(self): # Clean all tables import os self.pill = StreamPill(debug=False) self.session = boto3.session.Session() boto3.DEFAULT_SESSION = self.session self.pill.attach( self.session, os.path.abspath(os.path.join(os.path.dirname(__file__), 'pill'))) self.pill.playback() for table in reversed(self.db.metadata.sorted_tables): self.db.session.execute(table.delete()) self.db.session.commit() self.db.session.expunge_all() # Loading fixtures from api.accounts.fixtures import UserData if UserData not in self.datasets: self.datasets = list(self.datasets) self.datasets.append(UserData) try: self.load_fixtures(*self.datasets) except Exception, exc: logging.warning('Problem with loading fixture %s: %s', self.datasets, exc)
def setUp(self): super(AmazonEC2HelperTests, self).setUp() self.pill = StreamPill(debug=False) self.session = boto3.session.Session() boto3.DEFAULT_SESSION = self.session self.credentials = { 'token': 'token', 'secret': 'secret', 'region': 'region' }
def setUp(self): super(PigDataSourceTests, self).setUp() self.pill = StreamPill(debug=True) self.session = boto3.session.Session() boto3.DEFAULT_SESSION = self.session
def setUp(self): super(AmazonDynamoDBHelperTests, self).setUp() self.pill = StreamPill(debug=False) self.session = boto3.session.Session() boto3.DEFAULT_SESSION = self.session
def setUp(self): super(PigXMLPlanTest, self).setUp() self.pill = StreamPill(debug=True) self.session = boto3.session.Session() boto3.DEFAULT_SESSION = self.session