BUG: Local pytest suite fails to collect due to deprecated imports and mock schemas

Abierto
#307 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

  • #308 de @shubhumre777 — cerrado sin fusionar

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python, supabase
Área
backend, testing

Línea de trabajo

Start with tests/test_weaviate.py and tests/test_supabase.py, then run pytest tests/ to confirm the collection failures. Update the deprecated model import and align the Supabase mock return values with the current backend queries. Done means all test items collect and the suite runs successfully; the issue author says they have already fixed this locally and are ready to submit a pull request.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Is there an existing issue for this?
  • I have searched the existing issues
What happened?

📌 Issue Overview

The local pytest suite fails to collect and run tests due to deprecated model imports and outdated mock client schemas in the testing files. Specifically, WeaviateCodeChunk is deprecated, and the mock Supabase client configuration does not match the current backend schema.

🔍 Steps to Reproduce

  1. Clone the repository and set up the local environment.
  2. Open the terminal and navigate to the project root.
  3. Run the command pytest tests/ (or run with $env:PYTHONPATH=".;backend" on Windows).
  4. See the ImportError and collection errors across the test files.

🎯 Expected Behavior

The test suite should collect all items and execute successfully without any import or configuration errors.

🚨 Actual Behavior

13/13 test items fail to collect. The system throws import errors in tests/test_weaviate.py and schema structure errors in tests/test_supabase.py.

📷 Screenshot

N/A (This is a backend test configuration issue).

💡 Suggested Improvements

  • In tests/test_weaviate.py: Replace the deprecated WeaviateCodeChunk import with the active model classes (WeaviateRepository, WeaviatePullRequest, WeaviateUserProfile).
  • In tests/test_supabase.py: Update the mock Supabase client return values (e.g., client.table.return_value...) to properly align with the current backend queries.
    (Note: I have already resolved this locally and am ready to submit a Pull Request to fix it.)
Record
  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
Lenguaje dominante
Python
Estrellas
103
Forks
143
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AOSSIE-Org/Devr.AI

Todos los issues de AOSSIE-Org/Devr.AI

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.