Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for transcribe_file #1954

Merged

Conversation

Dhwaniartefact
Copy link
Contributor

Extend test coverage of "transcribe_file.py"

@Dhwaniartefact Dhwaniartefact force-pushed the dev/issue-extend-test-coverage-for-transcribe-file branch from 96c55f7 to 4672243 Compare July 9, 2024 18:58
@Dhwaniartefact Dhwaniartefact force-pushed the dev/issue-extend-test-coverage-for-transcribe-file branch from 4672243 to 221747e Compare July 9, 2024 22:17
@replaceafill
Copy link
Member

@Dhwaniartefact is this ready for review? It's still marked as Draft?

@Dhwaniartefact Dhwaniartefact marked this pull request as ready for review July 10, 2024 14:45
Copy link
Member

@replaceafill replaceafill left a comment

Choose a reason for hiding this comment

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

Great progress @Dhwaniartefact.

tests/MCPClient/test_transcribe_file.py Outdated Show resolved Hide resolved
tests/MCPClient/test_transcribe_file.py Outdated Show resolved Hide resolved
tests/MCPClient/test_transcribe_file.py Outdated Show resolved Hide resolved
tests/MCPClient/test_transcribe_file.py Outdated Show resolved Hide resolved
Comment on lines 144 to 150
assert models.Event.objects.filter(event_type="transcription").count() == 1
assert models.File.objects.count() == 2
assert models.File.objects.filter(filegrpuse="original").count() == 1
assert models.File.objects.filter(filegrpuse="text/ocr").count() == 1
assert (
models.Derivation.objects.filter(event__event_type="transcription").count() == 1
)
Copy link
Member

Choose a reason for hiding this comment

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

Could these filter calls include more criteria attributes? Fox example the transcription event has other meaningful attributes like detail, outcome or note that you can assert. The derivation could also have the source and derived files as criteria.

tests/MCPClient/test_transcribe_file.py Outdated Show resolved Hide resolved
tests/MCPClient/test_transcribe_file.py Show resolved Hide resolved
tests/MCPClient/test_transcribe_file.py Outdated Show resolved Hide resolved
tests/MCPClient/test_transcribe_file.py Outdated Show resolved Hide resolved
@Dhwaniartefact Dhwaniartefact merged commit 530dd3f into qa/1.x Jul 10, 2024
26 checks passed
@Dhwaniartefact Dhwaniartefact deleted the dev/issue-extend-test-coverage-for-transcribe-file branch July 10, 2024 22: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.

None yet

2 participants