Exemple #1
0
class IntegrationTestCase(TestCase):

  no_login = False

  def create_app(self):
    config = TestConfig()
    config.WHOOSH_BASE = os.path.join(BASEDIR, "whoosh", str(uuid.uuid4()))
    config.NO_LOGIN = self.no_login
    self.app = Application(config)

    return self.app

  def setUp(self):
    self.app.create_db()
    self.session = db.session

  def tearDown(self):
    db.session.remove()
    db.drop_all()

  def assert_302(self, response):
    self.assert_status(response, 302)

  def assert_204(self, response):
    self.assert_status(response, 204)
Exemple #2
0
  def create_app(self):
    config = TestConfig()
    config.WHOOSH_BASE = os.path.join(BASEDIR, "whoosh", str(uuid.uuid4()))
    config.NO_LOGIN = self.no_login
    self.app = Application(config)

    return self.app