Skip to content

Commit

Permalink
馃悰 Add missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
dankolbman committed Feb 26, 2021
1 parent 984f3cf commit 58ee142
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions creator/analyses/analyzer.py
Expand Up @@ -5,6 +5,7 @@
from functools import partial
from django.conf import settings
from django_s3_storage.storage import S3Storage
from graphql import GraphQLError
from creator.analyses.models import Analysis
from creator.files.models import Version

Expand Down
16 changes: 16 additions & 0 deletions tests/analyses/test_extract_data.py
@@ -0,0 +1,16 @@
import pytest
from graphql import GraphQLError
from creator.studies.factories import StudyFactory
from creator.files.factories import FileFactory
from creator.files.models import Version
from creator.analyses.analyzer import extract_data


def test_extract_data_no_study(db, settings):
settings.DEFAULT_FILE_STORAGE = "django_s3_storage.storage.S3Storage"

version = Version()
version.key.name = "test.csv"

with pytest.raises(GraphQLError) as err:
extract_data(version)

0 comments on commit 58ee142

Please sign in to comment.