Skip to content

Commit 49c2932

Browse files
committed
test(relation): add relation feature tests
Add the test bootstrap files for the `relation` feature, mirroring the structure of the main `python-activerecord` project. This ensures that the standardized relationship tests from the `rhosocial-activerecord-testsuite` are run against this backend, improving test coverage and consistency across the ecosystem.
1 parent 6d4ac91 commit 49c2932

6 files changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# tests/rhosocial/activerecord_postgres_test/feature/relation/conftest.py
2+
"""
3+
Pytest configuration for relation feature tests.
4+
5+
This file imports fixtures from the corresponding testsuite, making them
6+
available to the tests in this directory.
7+
"""
8+
from rhosocial.activerecord.testsuite.feature.relation.conftest import *
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
Tests for relation base functionality.
3+
Imports tests from the standardized testsuite.
4+
"""
5+
from rhosocial.activerecord.testsuite.feature.relation.test_base import TestRelationDescriptor # noqa: F401
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Test bridge for relation cache functionality.
3+
4+
This test file runs the relation cache tests from the testsuite using the PostgreSQL backend.
5+
"""
6+
import pytest
7+
8+
9+
# Import the test classes from the testsuite
10+
from rhosocial.activerecord.testsuite.feature.relation.test_cache import TestRelationCache
11+
12+
13+
# This will cause pytest to run all the tests in the imported class
14+
# The tests will use the fixtures and providers configured in conftest.py
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
Tests for relation descriptor functionality.
3+
Imports tests from the standardized testsuite.
4+
"""
5+
from rhosocial.activerecord.testsuite.feature.relation.test_descriptors import TestRelationDescriptors # noqa: F401
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
Tests for relation interfaces.
3+
Imports tests from the standardized testsuite.
4+
"""
5+
from rhosocial.activerecord.testsuite.feature.relation.test_interfaces import TestRelationInterfaces # noqa: F401
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
Tests for nested relationship access functionality.
3+
Imports tests from the standardized testsuite.
4+
"""
5+
from rhosocial.activerecord.testsuite.feature.relation.test_nested_relationship_access import TestNestedRelationshipAccess # noqa: F401

0 commit comments

Comments
 (0)