Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
interfect
funkwhale
Commits
5977f155
Commit
5977f155
authored
Jan 11, 2021
by
interfect
Browse files
Blacken style
parent
c49b8eec
Pipeline
#13161
failed with stages
in 8 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
api/tests/music/test_utils.py
View file @
5977f155
...
...
@@ -29,7 +29,7 @@ def test_guess_mimetype_try_using_extension_if_fail(wrong, factories, mocker):
(
"sample.flac"
,
{
"bitrate"
:
1608000
,
"length"
:
0.001
}),
(
"test.mp3"
,
{
"bitrate"
:
8000
,
"length"
:
267.70285714285717
}),
(
"test.ogg"
,
{
"bitrate"
:
112000
,
"length"
:
1
}),
(
"test.opus"
,
{
"bitrate"
:
112000
,
"length"
:
1
})
(
"test.opus"
,
{
"bitrate"
:
112000
,
"length"
:
1
})
,
],
)
def
test_get_audio_file_data
(
name
,
expected
):
...
...
@@ -112,13 +112,14 @@ def test_get_dirs_and_files(path, expected, tmpdir):
assert
utils
.
browse_dir
(
root_path
,
path
)
==
expected
@
pytest
.
mark
.
parametrize
(
"name, expected"
,
[
(
"sample.flac"
,
{
"bitrate"
:
1608000
,
"length"
:
0.001
}),
(
"test.mp3"
,
{
"bitrate"
:
8000
,
"length"
:
267.70285714285717
}),
(
"test.ogg"
,
{
"bitrate"
:
112000
,
"length"
:
1
}),
(
"test.opus"
,
{
"bitrate"
:
112000
,
"length"
:
1
})
(
"test.opus"
,
{
"bitrate"
:
112000
,
"length"
:
1
})
,
],
)
def
test_transcode_file
(
name
,
expected
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment