Exemple #1
0
def _setup():
	"""Test runner setup.

	"""
	tu.setup()
	term = tu.create_term()
	pyessv.save(term)
Exemple #2
0
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
Exemple #4
0
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)
Exemple #5
0
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)
Exemple #7
0
    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()
Exemple #9
0
def test_gitlab_push_hook_master():
    app, client = setup()
    with app.app_context():
        gitlab_evt(client, push_hook_master, expected_status=403)
Exemple #10
0
def test_gitlab_push_hook_branch():
    app, client = setup()
    with app.app_context():
        gitlab_evt(client, push_hook_branch)
Exemple #11
0
def test_github_ping():
    app, client = setup()
    with app.app_context():
        github_evt(client, ping)
Exemple #12
0
def test_github_push_branch():
    app, client = setup()
    with app.app_context():
        github_evt(client, push_branch, expected_status=403)
Exemple #13
0
def test_github_push_master():
    app, client = setup()
    with app.app_context():
        github_evt(client, push_master)