Skip to content

Commit

Permalink
tests/test_api_c3voc: better test naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi authored and russss committed Sep 1, 2024
1 parent 7cb8728 commit 2d909d2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tests/test_api_c3voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_denies_request_wrong_year(client, app, proposal):
assert rv.status_code == 422


def test_request_none_update_none(client, app, db, proposal):
def test_request_none_unchanged(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -145,7 +145,7 @@ def test_request_none_update_none(client, app, db, proposal):
assert proposal.c3voc_url is None


def test_request_voctoweb_update_voctoweb_correct_url(client, app, db, proposal):
def test_update_voctoweb_with_correct_url(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -183,7 +183,7 @@ def test_request_voctoweb_update_voctoweb_correct_url(client, app, db, proposal)
assert proposal.youtube_url is None


def test_request_voctoweb_update_voctoweb_wrong_url(client, app, db, proposal):
def test_denies_voctoweb_with_wrong_url(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -221,7 +221,7 @@ def test_request_voctoweb_update_voctoweb_wrong_url(client, app, db, proposal):
assert proposal.c3voc_url == "https://example.com"


def test_request_voctoweb_clears_voctoweb(client, app, db, proposal):
def test_clears_voctoweb(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -257,7 +257,7 @@ def test_request_voctoweb_clears_voctoweb(client, app, db, proposal):
assert proposal.c3voc_url is None


def test_request_thumbnail_update_thumbnail_correct_path(client, app, db, proposal):
def test_update_thumbnail_with_path(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -295,7 +295,7 @@ def test_request_thumbnail_update_thumbnail_correct_path(client, app, db, propos
assert proposal.youtube_url is None


def test_request_thumbnail_update_thumbnail_correct_url(client, app, db, proposal):
def test_update_thumbnail_with_url(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -333,7 +333,7 @@ def test_request_thumbnail_update_thumbnail_correct_url(client, app, db, proposa
assert proposal.youtube_url is None


def test_request_thumbnail_update_thumbnail_not_url(client, app, db, proposal):
def test_denies_thumbnail_not_url(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand All @@ -356,7 +356,7 @@ def test_request_thumbnail_update_thumbnail_not_url(client, app, db, proposal):
"voctoweb": {
"enabled": True,
"frontend_url": "",
"thumb_path": "gopher://example.com/thumb.jpg",
"thumb_path": "/example.com/thumb.jpg",
},
"youtube": {
"enabled": False,
Expand All @@ -369,7 +369,7 @@ def test_request_thumbnail_update_thumbnail_not_url(client, app, db, proposal):
assert proposal.thumbnail_url == "https://example.com/thumb.jpg"


def test_request_thumbnail_clears_thumbnail(client, app, db, proposal):
def test_clears_thumbnail(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -405,7 +405,7 @@ def test_request_thumbnail_clears_thumbnail(client, app, db, proposal):
assert proposal.thumbnail_url is None


def test_request_youtube_update_youtube_correct_url(client, app, db, proposal):
def test_update_youtube_with_correct_url(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -444,7 +444,7 @@ def test_request_youtube_update_youtube_correct_url(client, app, db, proposal):
assert proposal.youtube_url == "https://www.youtube.com/watch"


def test_request_youtube_update_youtube_correct_url_but_existing_url(client, app, db, proposal):
def test_denies_youtube_update_with_exisiting_url(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -483,7 +483,7 @@ def test_request_youtube_update_youtube_correct_url_but_existing_url(client, app
assert proposal.youtube_url == "https://example.com"


def test_request_youtube_update_youtube_wrong_url(client, app, db, proposal):
def test_denies_youtube_update_with_wrong_url(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down Expand Up @@ -522,7 +522,7 @@ def test_request_youtube_update_youtube_wrong_url(client, app, db, proposal):
assert proposal.youtube_url == "https://example.com"


def test_request_youtube_clears_youtube(client, app, db, proposal):
def test_clears_youtube(client, app, db, proposal):
app.config.update(
{
"VIDEO_API_KEY": "api-key",
Expand Down

0 comments on commit 2d909d2

Please sign in to comment.