Skip to content

Commit

Permalink
Fix: Comment the request test part(temporary)
Browse files Browse the repository at this point in the history
  • Loading branch information
seungki1011 committed Jul 27, 2023
1 parent e224117 commit c60600f
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions tests/scratch/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,37 @@ def client():
yield c


# src.scratch.main - test to see if generate_cover works well
def test_create_model_and_generate_image_and_gcs_upload(client):
response = client.post(
"/generate_cover",
json={
"song_names": "Test: song_names(generate_cover)",
"artist_name": "Test: artist_name(generate_cover)",
"genre": "Test: genre(generate_cover)",
"album_name": "Test: album_name(generate_cover)",
"lyric": "Test: lyric(generate_cover)",
},
)

assert response.status_code == 200
assert "images" in response.json().keys() # Verify that "images" is in dictionary
assert (
len(response.json()["images"]) > 0
) # Verify that the image you created is stored well


# src.scratch.main - test to see if review works well
def test_get_review_and_gcs_upload(client):
response = client.post(
"/review", json={"rating": -1, "comment": "Test: comment(review)"}
)
# -- Request-Response 테스트는 고칠 예정! --

assert response.status_code == 200
# src.scratch.main - test to see if generate_cover works well
# def test_create_model_and_generate_image_and_gcs_upload(client):
# response = client.post(
# "api/generate_cover",
# json={
# "song_names": "Test: song_names(generate_cover)",
# "artist_name": "Test: artist_name(generate_cover)",
# "genre": "Test: genre(generate_cover)",
# "album_name": "Test: album_name(generate_cover)",
# "lyric": "Test: lyric(generate_cover)",
# },
# )

# assert response.status_code == 200
# assert "images" in response.json().keys() # Verify that "images" is in dictionary
# assert (
# len(response.json()["images"]) > 0
# ) # Verify that the image you created is stored well


# # src.scratch.main - test to see if review works well
# def test_get_review_and_gcs_upload(client):
# response = client.post(
# "api/review", json={"rating": -1, "comment": "Test: comment(review)"}
# )

# assert response.status_code == 200

# ----------------------------------------------------------------


# src.scratch.main - test exception handling for good operation
Expand Down

0 comments on commit c60600f

Please sign in to comment.