Skip to content
Snippets Groups Projects
Verified Commit 79fcc3dd authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

refactor: move owned_licensed_image fixture -> test_images

parent 5752964c
No related branches found
No related tags found
No related merge requests found
......@@ -104,11 +104,6 @@ def public_domain_license() -> License:
return LicenseFactory(identifier="pd", name="Public Domain")
@pytest.fixture
def owned_licensed_image(image_file, common_user1, public_domain_license) -> Image:
return ImageFactory(image=image_file, owner=common_user1, license=LicenseFactory())
@pytest.fixture
def api_client() -> APIClient:
"""Unauthenticated API client"""
......
......@@ -2,7 +2,7 @@ import pytest
from conftest import assert_data
from program.models import Image
from program.tests.factories import ImageFactory
from program.tests.factories import ImageFactory, LicenseFactory
pytestmark = pytest.mark.django_db
......@@ -24,6 +24,11 @@ def owned_image(image_file, common_user1) -> Image:
return ImageFactory(image=image_file, owner=common_user1)
@pytest.fixture
def owned_licensed_image(image_file, common_user1, public_domain_license) -> Image:
return ImageFactory(image=image_file, owner=common_user1, license=LicenseFactory())
def test_create_image(image_file, common_api_client1):
data = {"image": image_file}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment