Skip to content

Conversation

@unna97
Copy link
Owner

@unna97 unna97 commented Aug 14, 2024

Description

This pull requests add tests for the app.

Motivation and Context

#36 This aims to ease adding changes and move towards tests driven environment.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

unna97 added 21 commits August 14, 2024 12:32
- Commit adds a file hash to AudioFIle to keep unique files

- Delete previous migrations and migrates again to allow addition of new primary key

- Adds file_hash to utils.py
- Add small audio files for testing
- Create tests and example tests for AudioFIle Model
- Change settings to detect Audio File test
- TimeBoundLabel - abstract label
- SubtitleLabel, AudioAnnotation
…e fixtures

- Change DurationField to TimeField
- Handle parsing different types of data
- Add test to confirm correct addition of data
- Use AudioLabel as example for testing abstract model
- Reset Migrations for ease
- Update the image source URL in the index.html template to use the `get_media_prefix` function instead of the static path.
- This change ensures that the image is loaded correctly when the media prefix is different from the static path.
…tles

- Add Subtitle model to handle parsing and creating subtitles
- Implement tests for parsing and creating single and multiple subtitles
- Use pytest module and setup fixtures for tests
* Add message alert for errors as well as success
* Make upload atomic
* Shift subtitle data save logic to form
- Update the AudioModelFileForm to include validation for the audio file type.
- Add a clean_file method to check the MIME type of the uploaded audio file.
- Raise a validation error if the file type is not valid.
- Import the mimetypes module to handle MIME type checking.
- Update the form labels and help texts for better clarity.
- Add tests for SubtitleFileForm and AudioModelForm
- The api and media root tests are failing , add correct tests
- Add tests to make sure your view classes are correctly configured
- add  & mark fail test reasons
- Remove print
- Convert save annotation from function to class based view
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