Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@SAMAD101
Copy link
Member

#5

@SAMAD101
Copy link
Member Author

@Mr-Sunglasses the test fixes for rate limiting are in this one #27 ig

@Mr-Sunglasses
Copy link
Member

@SAMAD101 Still can't figure out what you are doing :(

@Mr-Sunglasses
Copy link
Member

Also there are error in the monkeypatch section of pytest

@SAMAD101
Copy link
Member Author

SAMAD101 commented Dec 28, 2023

@SAMAD101 Still can't figure out what you are doing :(

File size checking:
I made a simple function to do it in utils.py, check_file_size_limit which return True if the file is larger than 20MB else False.
So inside post_as_a_text or post_as_a_file, when it is checked

if check_file_size_limit

This will raise an exception if the file size is more than 20MB

Tests:
I've made a mock environment post_env. (Will do something similar for the rest of the tests if possible)

So post_env creates and generates two mock functions:

  • post_file: for post_as_a_file
  • post_text: for post_as_a_text
    And
    I've monkeypatched the check_file_size_limit to our mock version of in conftest.py which always returns True, I did this to test in a way...what happens when the file size is more than 20MB...

(good night, will work on this tomorrow)

@Mr-Sunglasses
Copy link
Member

@SAMAD101 This PR has lot of error so that is why I'm closing it. 😿

@SAMAD101
Copy link
Member Author

@SAMAD101 This PR has lot of error so that is why I'm closing it. 😿

Np, this branch got so messed up anyway. Too many conflicts

Will make a fresh branch.

@SAMAD101 SAMAD101 deleted the issue5 branch December 29, 2023 06:10
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