def _setup(): """Test runner setup. """ tu.setup() term = tu.create_term() pyessv.save(term)
def _setup(): """Test runner setup. """ tu.setup() count = pyessv.get_count() term = tu.create_term() pyessv.save(term) tu.assert_int(pyessv.get_count(), count + 1)
def setUp(self): setup() self.cls_name = 'TestModel' class ModelA(models.Model): __lc_cls__ = self.cls_name name = fields.Field() age = fields.Field() self.Model = ModelA
def _test(governance_action, governance_status): """Performs governance tests. """ term = tu.get_term() tu.assert_str(term.status, pyessv.GOVERNANCE_STATUS_PENDING) governance_action(term) tu.assert_str(term.status, governance_status) pyessv.save(term) tu.setup() term = tu.get_term() tu.assert_str(term.status, governance_status)
def _test(governance_action, governance_status): """Performs governance tests. """ term = tu.get_term() tu.assert_str(term.status, pyessv.GOVERNANCE_STATUS_PENDING) governance_action(term) tu.assert_str(term.status, governance_status) pyessv.save(term) tu.setup() print "ZZZ", pyessv.get_count() term = tu.get_term() print id(term) tu.assert_str(term.status, governance_status)
def setUp(self): setup() self.cls_name = 'TestModel' class ModelA(models.Model): __lc_cls__ = self.cls_name name = fields.Field() age = fields.Field() self.Model = ModelA self.models = [ self.Model.create(name='Hi {0}'.format(i), age=18) for i in range(100) ] self.Model.commit_all(*self.models)
def setUp(self): setup() self.cls_name = 'TestModel' class ModelA(models.Model): __lc_cls__ = self.cls_name name = fields.Field() age = fields.Field() self.Model = ModelA self.models = [ self.Model.create(name='Hi', age=18), self.Model.create(name='Ho', age=21), self.Model.create(name='He', age=23), ] for model in self.models: model.commit()
def setUp(self): self.cls_name = 'TestModel' setup()
def test_gitlab_push_hook_master(): app, client = setup() with app.app_context(): gitlab_evt(client, push_hook_master, expected_status=403)
def test_gitlab_push_hook_branch(): app, client = setup() with app.app_context(): gitlab_evt(client, push_hook_branch)
def test_github_ping(): app, client = setup() with app.app_context(): github_evt(client, ping)
def test_github_push_branch(): app, client = setup() with app.app_context(): github_evt(client, push_branch, expected_status=403)
def test_github_push_master(): app, client = setup() with app.app_context(): github_evt(client, push_master)