-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrapper.upload_file_to_s3
など:Content-Typeが取得できないときは、Errorをスローするのではなく…
…、"application/octet-stream"を渡すようにする (#362) * content-typeが推測できないときの処理を変更 * format * format * update README
- Loading branch information
1 parent
8140777
commit 3f5cea4
Showing
5 changed files
with
32 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.48.0" | ||
__version__ = "0.48.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
from annofabapi.wrapper import Wrapper | ||
|
||
# プロジェクトトップに移動する | ||
os.chdir(os.path.dirname(os.path.abspath(__file__)) + "/../") | ||
|
||
data_dir = Path("./tests/data") | ||
|
||
|
||
class TestWrapperUtils: | ||
def test__get_mime_type(self): | ||
assert Wrapper._get_mime_type(str(data_dir / "lenna.png")) == "image/png" | ||
assert Wrapper._get_mime_type("sample.jpg") == "image/jpeg" | ||
assert Wrapper._get_mime_type("sample.txt") == "text/plain" | ||
assert Wrapper._get_mime_type("sample") == "application/octet-stream" |