Skip to content

remove copypaste in test_contract_db[Insert|Update|UpdateExt] #62

@potehinre

Description

@potehinre
        columns = """[{"name":"name","type":"varchar",
        "index": "1",  "conditions":"true"},
        {"name":"test","type":"varchar",
        "index": "0",  "conditions":"true"}]"""
        permission = """{"insert": "true",
        "update" : "true","new_column": "true"}"""
        data = {"Name": "test", "ApplicationId":1,
                "Columns": columns,
                "Permissions": permission}
        result = utils.call_contract(url, prKey, "NewTable", data, token)
        tx = utils.txstatus(url,
                                self.config["1"]["time_wait_tx_in_block"],
                                result['hash'], token)
        contract = self.contracts["dbInsert"]
        self.check_contract(contract["code"], contract["asert"])

why not move that piece of code to helper functions, it copypasted tree times, in all test_contact_db..
https://github.com/GenesisKernel/genesis-tests/blob/6f57ca7ef9dc460cf469ac3643267cc076480d3f/contract_functions_tests.py#L192

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions