def setUp(self): super(ImportTest, self).setUp() with open(os.path.join(os.path.dirname(__file__), 'flights.json')) as f: self.dashboard = json.loads(f.read()) self.user = user_factory.create()
def raw_event(self): timestamp = 1411778709.791 user = user_factory.create() created_at = datetime.datetime.utcfromtimestamp(timestamp) raw_event = {"action": "view", "timestamp": timestamp, "object_type": "dashboard", "user_id": user.id, "object_id": 1} return raw_event, user, created_at