Ejemplo n.º 1
0
def report_delete_execution():
    project = request.json['project']
    suite = request.json['suite']
    execution = request.json['execution']
    _verify_permissions(Permissions.ADMIN, project)
    errors = report.delete_execution(project, suite, execution)
    return jsonify(errors)
Ejemplo n.º 2
0
    def test_delete_execution(self, project_class, test_utils):
        _, project = project_class.activate()
        execution = test_utils.execute_random_suite(project)
        assert os.path.isdir(execution['exec_dir'])

        errors = report.delete_execution(project, execution['suite_name'],
                                         execution['timestamp'])

        assert errors == []
        assert not os.path.isdir(execution['exec_dir'])
Ejemplo n.º 3
0
    def test_delete_execution(self, project_class, test_utils):
        _, project = project_class.activate()
        execution = test_utils.execute_random_suite(project)
        execpath = os.path.join(Project(project).report_directory_path, execution['suite_name'])
        assert os.path.isdir(execpath)
        assert os.path.isdir(execution['exec_dir'])

        errors = report.delete_execution(project, execution['suite_name'])

        assert errors == []
        assert not os.path.isdir(execpath)