Skip to content

Fix main's lint and tests after two merges crossed - #1569

Merged
mihow merged 1 commit into
mainfrom
fix/main-tests-mock-import
Oct 30, 2026
Merged

mihow merged 1 commit into
mainfrom
fix/main-tests-mock-import

Conversation

@mihow

@mihow mihow commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Main is red on lint and on two test errors. #1515 removed the module-level mock import from ami/main/tests.py while #1413, which uses it, was still open; each passed CI alone, and they merged 11 minutes apart. This adds the import back so main, and every open PR's CI, can pass again.

List of Changes

  1. Main's lint and backend tests pass again: ami/main/tests.py imports from unittest import mock.

Review focus

  • One-line change. The two errors on main were NameError: name 'mock' is not defined in TestProjectSetup, and flake8 reported F821 at the same line.

Testing

  1. Run pre-commit run --files ami/main/tests.py: black, isort and flake8 pass.
  2. Run manage.py test ami.main.tests.TestProjectSetup: 8 tests pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_014T3x9mgq9C4Pvq7PDkfi1g

The project-setup test added in #1413 uses mock.patch.object, but the file
has no module-level `from unittest import mock`, so flake8 reports F821 and
the test errors with NameError on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014T3x9mgq9C4Pvq7PDkfi1g
Copilot AI balanced review requested due to automatic review settings October 29, 2026 22:17
@netlify

netlify Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for antenna-preview canceled.

Name Link
🔨 Latest commit 283e9e7
🔍 Latest deploy log https://app.netlify.com/projects/antenna-preview/deploys/6ae3c5f8e6b93ae342e72428

@netlify

netlify Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for antenna-ssec canceled.

Name Link
🔨 Latest commit 283e9e7
🔍 Latest deploy log https://app.netlify.com/projects/antenna-ssec/deploys/6ae3c5f8143c9a4c271e52d6

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a99ebb13-89fd-4536-882c-25e92df72661
Commits

Reviewing files that changed from the base of the PR and between 3b766e1 and 283e9e7.

Files selected for processing: 1
  • ami/main/tests.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mihow mihow changed the title Fix the failing lint and tests on main after the project-setup test change Fix main's lint and tests after two merges crossed Oct 29, 2026
@mihow
mihow merged commit 5703d31 into main Oct 30, 2026
7 checks passed
@mihow
mihow deleted the fix/main-tests-mock-import branch October 30, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants