Skip to content

Commit

Permalink
add test for actions
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-iv committed Mar 21, 2024
1 parent 62f6086 commit a2e3ec2
Show file tree
Hide file tree
Showing 11 changed files with 509 additions and 32 deletions.
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
default_install_hook_types:
- pre-commit
- pre-push
- commit-msg

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# - id: check-yaml
- id: end-of-file-fixer
stages: [commit]
- id: trailing-whitespace
stages: [commit]
- id: debug-statements
stages: [push]

# ## Isort
# - repo: https://github.com/pycqa/isort
# rev: 5.12.0
# hooks:
# - id: isort
# name: isort
# stages: [pre-commit]

# ## Black
# - repo: https://github.com/psf/black
# rev: 23.3.0
# hooks:
# - id: black
# stages: [pre-commit]

# ## Ruff
# - repo: https://github.com/charliermarsh/ruff-pre-commit
# rev: v0.0.260
# hooks:
# - id: ruff
# stages: [pre-commit]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Tests](https://github.com//ckanext-relationship/workflows/Tests/badge.svg?branch=main)](https://github.com//ckanext-relationship/actions)
[![Tests](https://github.com/DataShades/ckanext-relationship/workflows/Tests/badge.svg)](https://github.com/DataShades/ckanext-relationship/actions/workflows/test.yml)

# ckanext-relationship

Expand Down
Empty file.
5 changes: 5 additions & 0 deletions ckanext/relationship/logic/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ def relationship_relations_ids_list(context, data_dict):
@tk.auth_allow_anonymous_access
def relationship_get_entity_list(context, data_dict):
return {"success": True}


@tk.auth_allow_anonymous_access
def relationship_relationship_autocomplete(context, data_dict):
return {"success": True}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-07-02 14:40:37.719003
"""

import sqlalchemy as sa
from alembic import op

Expand Down
7 changes: 7 additions & 0 deletions ckanext/relationship/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pytest


@pytest.fixture
def clean_db(reset_db, migrate_db_for, with_plugins):
reset_db()
migrate_db_for("relationship")
File renamed without changes.
Loading

0 comments on commit a2e3ec2

Please sign in to comment.