Skip to content

Commit

Permalink
Scottx611x/td api (#1620)
Browse files Browse the repository at this point in the history
* Testing the feasibility of running multiple travis builds over different browsers/platforms

* Wrap arg in quotes as to not evaluate spaces in env var

* Try out an extra wait

* I think testing Safari on anything other than OS X is a stretch

* See if bumping OS X v. down helps

* See if some extra waiting helps (I think Sauce lab's OS X machines are especially slow)

* Move helper functions to utils file

* Switch back o El Capitan because i believe timing was the only issue

* move helper functions

* Test adding some longer waits

* Fix whitespace

* fix imports

* Comment out file upload test for now

* Add `cleanup_on_error()` that we can decorate test methods with

* Tidy up tests

* Remove windows from acceptance testing

* Move acceptance test running into own shell script and call from within travis

* `cd` into the proper directory

* `cd` back to `refinery` directory

* Cleanup some more tests

* Add id to aid testing

* Add id to aid testing

* Cleanup login method

* Abstract out reused login moethod

* Utilize relative import

* PEP8

* only run acceptance tests if we detect a build for a PR

* Always run our acceptance tests

* Add acceptance tests for user registration and login

* Don't use separate shell script (for now)

* Remove `cd` comands

* Refactor selenium utility functions

* Add script to run acceptance tests on vagrant or travis

* Lower `DEFAULT_WAIT` Now that we aren't relying on SauceLabs VMs

* Cleanup setting of breakpoints, and refactor `cleanup_on_error` decorator

* Remove unnecessary env var, and re-add `global` as to ensure a single build

* Sauce_connect isn't needed

* pip caching seems stable

* PEP8

* Fail shell script if any step doesn't work properly

* GeckoDriver expects a more recent version of Firefox

* Remove Comments

* Update Default wait time

* Bump pytest-selenium version

* Update Comment

* Utilize `wait_until_id_clickable`

* Add tests for global analysis popover

* Add tests for Datasets panel

* Update comment

* Add a status to all generated Analyses

* Update stats test to check for actual object counts

* include gecko driver in our build process for ease of local selenium-based testing

* Refactor old acceptance test implementation in favor of simplicity and uniformness with our current Django unit tests

* Make virtual display bigger

* Update selenium testing utils

* Update assert body text method

* Update selenium tests

* Update `wait_until_id_visible()`

* bump Factory-Boy requirement

* Update travis as mentioned issue has been closed

* Clean up gecko driver Puppet install

* Update docstrings

* Remove unnecessary tests

* more geckodriver install cleanup

* Change Default wait

* update wait_until_id_visible()

* pull out duplicated code into ui-deletion helper method

* Update acceptance tests

* Minor changes due to abstraction of deletion code

* Fix typo

* guest user creation isn't needed here anymore

* Merge branch scottx611x/django_1.7_upgrade into scottx611x/acceptance_testing

* Flip the order of some installed apps due to Django 1.7 ContentType loading

* Decorate function as to not test 3rd party code's functionality

* Utilize StaticLiveServerTestCase

* Update delete_from_ui() helper

* Refactor decorator name to be more verbose

* Don't need to take a screenshot here

* Add xvfb and python3 to travis

* add pyvirtualdisplay req

* Rename geckodriver class to selenium

* Update order

* Update order of INSTALLED_APPS for testing purposes

* Update logging levels

* Update TEST_RUNNER per Django system-check suggestion

* Update tests

* Fix `get_or_create()`

* Access actual object returned from `get_or_create()` tuple

* Update logger statement

* Do not need to specify `live server` here since it has a default value

* Update string formatting to work properly

* Update isa/pre-isa archive deletion to produce less unnecessary errors

* Update Tests

* Manually save public group to sync db between threads (Specific to use of StaticLiveServerTestCase)

* Update `DEFAULT_WAIT`

* Share Datasets upon factory_boy creation

* Create public group for APIV2 test case

* Added group creation to the wrong TestCase

* Remove `django-nose` in favor of Django's new: `DiscoverTestRunner`

* This file shouldn't exist anymore. Probably wasn't caught in the merge here: 0c727cc

* Include ontology fixture content inside of a Data migration (#1581)

* Update puppet-archive version

* Utilize `puppet-archive` and clean up neo4j.pp

* Cleanup selenium manifest

* Factor out solr class from init.pp

* don't need to chmod here

* We are now using StaticLiveServerTestCase

* "Users of the `puppet-archive`module are responsible for archive package dependencies"

* Remove unused var

* Point to new archive download location

* Fix string formatting error

* Add `TEST_RUNNER` setting to base.py so that someone testing on `prod` locally could also benefeit

* update order of `INSTALLED_APPS` addresses: #1353

* Refactor all tests that interact with the ORM to inherit from `TransactionTestCase` (removes need for crazy tearDown()'s)

* DEFAULT_WAIT Shouldn't be that long

* Manually save `public group` as to persist data between test and web driver threads

* Update comment

* Don't need to optimize sole's index in tests

* Inherit from TransactionTestCase here

* `20` was actually a good fail-safe if things get slow for one reason or another

* switch order of INSTALLED APPS

* Cleanup selenium test cases

* Remove other `unittest` usages and unnecessary tests

* Override setUp() in a cleaner manner

* Add a travis fold

* Clean up FileStoreitem and InvestigationLink error handling

* Clean up error handling for isa & pre-isa archives

* Update comments

* Cleanup factory_boy factories and utils

* This is already a default value

* DRY

* Update existing DataMigrations to a more easily manageable format

* More robust Data migrations

* Remove `pk`

* Bump DRF version to latest that supports Django 1.7

* Add `tools` app

* Add models

* Configure admin ui for new models

* Add migration

* Add `tools/definitions/` endpoint

* Wrap deletion operations in transactions

* Add tools app

* Add factories and utils method to create dummy ToolDefinitions for Testing

* We don't need `django.setup()` here unless script is being run as a standalone

* RunPython is already encapsulated in a transaction

* refactor `get_isa_archive()` & `get_pre_isa_archive()`

* Analysis.status isn't necessary for testing

* Add Error Handling to `SeleniumTestBase.setUp()`

* Allow for proper rendering of self-referential Many-to-Many rels.

* Update models & serializers

* Add basic ToolDefinition API test case

* Update Models and Migrations file

* Add creation of LIST:LIST:PAIR ToolDef to utils script

* Update Serializer for more easily readble API Responses

* Update Tests

* Add MGMT command to genereate Smaple ToolDefinitions

* Demand users be authenticated to access DRF api endpoints

* Add more tests for ToolDef API

* Refactor DRF API related tests due to newly required Authentication

* Remove unused `nesting_type` field

* Add comment

* Add AdminFieldPopulator class

* Update MGMT command

* Add `TEST_NON_SERIALIZED_APPS` setting due to pre Django 1.9 bug

* Don't need to share datasets pubilcly in acceptance tests

* Utilize `serialized_rollback` to ensure migration data persists in StaticLiveServerTestCases

* Refactor isa/pre_isa archive fetching into one method

* Remove other unnecessary instances of `tearDown()`

* Update method signature

* Update comment

* Fix Test

* Revert "Fix Test"

This reverts commit 673827a.

* Don't bundle (pre)isa_archive fetching functionality & Utilize existing `get_investigation()`

* Handle potential AttributeErrors that could occcur

* Rename `tools` to `tool_manager`

* Favor APITestCase to ensure initial DB state persists throughout tests

* Provide request auth in test for newly secured endpoints

* Remove transaction context manager

* Refactor method name

* Keeping Python 3 in mind

* Rename field for clarity

* Add comments

* Fix serializer for newly added fieldname

* django.setup() not necessary (unless running as a standalone script)

* Change `nested_elements` -> `file_relationship` per Model field rename

* Reflect lack of POSTing in comment

* Fix import ordering

* Remove MGMT command since its only needed for a short period of time

* Migrations due to GalaxyParameter child class

* Add useful comment

* Remove already default values

* Revert from usage of Generic DRF api perm classes

* Change sample data generation to reflect new schema

* Ensure that Users accessing ToolDefinitions are authenticated

* Rename GalaxyToolParameter to GalaxyParameter

* Squash migrations

* Old isa_archive deletion tests were of better form

* Quoted references only necessary for manual avoidance of circ. imports

* We could have a tool without any Parameters

* Cleanup imports

* Remove unutilized APIClient

* Fix ordering of imports

* Fix migration

* Remove unnesscessary user creation

* Remove TearDown

* Remove constraint on ToolDefinition description & rename is_editable field

* Add `galaxy_workflow_step` field and squash migrations

* Scottx611x/td api url routing (#1622)

* Add RouterCombiner class to allow for url definitions to be app specific

* Don't really need `import as`

* Relative import

* Fix import ordering

* Place hard-coded DRF api urls into their own apps

* Fix Import ordering

* Add the ability to generate basic ToolDefinitons from properly annota… (#1624)

* Add the ability to generate basic ToolDefinitons from properly annotated Galaxy WFs

* Add `galaxy_workflow_step` field

* Validate incoming workflow annotation data

* Add Factory for GalaxyParameter creation

* Add tests to ensure proper creation of ToolDefinitions from Galaxy workflow annotations

* Handle ConnectionError if we can't reach Galaxy

* Rename `create_nesting()`

* Add custom Exception

* Refactor `validate_workflow_annotation()`

* Refactor ToolDefinition generation MGMT command

* Update tests

* Simplfy validation logic in mgmt command

* Utilize jsonschema to validate incoming ToolDefinitions

* Update mgmt command

* Update tests and test data

* Add `jsonschema` requirement

* Rename some things for clarity

* Add & Rename test data

* Properly handle invalid FileTypes in workflow annotations

* Fix Typo

* Add helpful comment

* jsonschema.validate is None upon successful validation, otherwise a ValidaationError is raised

* Cleanup generate_tool_definitions mgmt command

* Remove old clunky method to create ToolDefs in favor of new one

* Fix tests

* Clean up utils.py

* Update docstring

* Changes suggested from CR

* Directly access key rather that iterating through

* Split large ToolDefinition schema into individual files

* We don't need to use `hyper-schema`

* Let an empty object denote that we're at the bottom-most FileRelationship

* Travis didn't seem to like `os.path.abspath` so lets try `TRAVIS_BUILD_DIR` env var

* Try to fix Travis

* Trying out paths again

* Git doesn't automatically recognize case-sensitive only filename changes

* Remove blank lines and "..."

* Styling fixes
  • Loading branch information
scottx611x committed Mar 21, 2017
1 parent 8f3d383 commit 1360dcd
Show file tree
Hide file tree
Showing 39 changed files with 1,423 additions and 92 deletions.
1 change: 1 addition & 0 deletions refinery/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def get_setting(name, settings=local_settings):
'visualization_manager',
'annotation_server',
'selenium_testing',
'tool_manager',
'flatblocks',
'chunked_upload',
'rest_framework',
Expand Down
61 changes: 22 additions & 39 deletions refinery/config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from haystack.query import SearchQuerySet
from haystack.views import FacetedSearchView
from registration.backends.default.views import ActivationView
from rest_framework import routers
from tastypie.api import Api

from config.utils import RouterCombiner
from core.api import (AnalysisResource, DataSetResource, ExtendedGroupResource,
FastQCResource, GroupManagementResource,
InvitationResource, NodePairResource,
Expand All @@ -22,17 +22,18 @@
WorkflowInputRelationshipsResource, WorkflowResource)
from core.forms import RegistrationFormWithCustomFields
from core.models import DataSet, AuthenticationFormUsernameOrEmail
from core.views import (AnalysesViewSet, CustomRegistrationView,
DataSetsViewSet, NodeGroups, NodeViewSet,
WorkflowViewSet)
from core.urls import core_router
from core.views import CustomRegistrationView
from data_set_manager.api import (AssayResource, AttributeOrderResource,
AttributeResource, InvestigationResource,
ProtocolReferenceResource,
ProtocolReferenceParameterResource,
ProtocolResource, PublicationResource,
StudyResource)
from data_set_manager.views import Assays, AssaysAttributes, AssaysFiles
from file_store.views import FileStoreItems
from data_set_manager.urls import data_set_manager_router
from file_store.urls import file_store_router

from tool_manager.urls import tool_manager_router


logger = logging.getLogger(__name__)
Expand All @@ -44,11 +45,6 @@
.facet('technology')
.highlight())

# Django REST Framework urls
router = routers.DefaultRouter()
router.register(r'workflows', WorkflowViewSet)
router.register(r'nodes', NodeViewSet)

# NG: added for tastypie URL
v1_api = Api(api_name='v1')

Expand Down Expand Up @@ -151,34 +147,6 @@
),
name='search'
),
# Wire up our API using automatic URL routing.
url(r"^api/v2/", include(router.urls)),

url(r'^api/v2/node_groups/$', NodeGroups.as_view()),

url(r'^api/v2/assays/$', Assays.as_view()),

url(r'^api/v2/assays/(?P<uuid>'
r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{'
r''r'12})/files/$', AssaysFiles.as_view()),

url(r'^api/v2/assays/(?P<uuid>'
r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{'
r''r'12})/attributes/$', AssaysAttributes.as_view()),

url(r'^api/v2/file_store_items/(?P<uuid>'
r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{'
r''r'12})/$', FileStoreItems.as_view()),

url(r'^api/v2/data_sets/(?P<uuid>'
r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{'
r''r'12})/$',
DataSetsViewSet.as_view()),

url(r'^api/v2/analyses/(?P<uuid>'
r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{'
r''r'12})/$',
AnalysesViewSet.as_view()),

# (r'^favicon\.ico$',
# 'django.views.generic.simple.redirect_to',
Expand All @@ -201,3 +169,18 @@
urlpatterns += patterns(
'', url(r'^__debug__/', include(debug_toolbar.urls)),
)


# Django REST Framework Url Routing
# RouterCombiner.extend(<router instance>) to include DRF Routers defined in
# other apps urls.py files
router = RouterCombiner()
router.extend(core_router)
router.extend(data_set_manager_router)
router.extend(file_store_router)
router.extend(tool_manager_router)

# Wire up our DRF APIs using automatic URL routing.
urlpatterns += patterns(
'', url(r"^api/v2/", include(router.urls))
)
18 changes: 18 additions & 0 deletions refinery/config/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from rest_framework.routers import DefaultRouter


class RouterCombiner(DefaultRouter):
"""
Extends `DefaultRouter` class to add a method for extending url routes
from another router.
Allows for app-specific url definitions to stay inside their own apps.
"""
def extend(self, router):
"""
Extend the routes with url routes of the passed in router.
router: DRF Router instance containing route definitions.
"""
self.urls.extend(router.urls)
self.registry.extend(router.registry)
13 changes: 0 additions & 13 deletions refinery/core/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1775,11 +1775,6 @@ def setUp(self):
)
self.userprofile = UserProfile.objects.get(user=self.user)

def tearDown(self):
User.objects.all().delete()
UserProfile.objects.all().delete()
Tutorials.objects.all().delete()

def test_tutorial_creation(self):
self.assertIsNotNone(
Tutorials.objects.get(user_profile=self.userprofile)
Expand Down Expand Up @@ -2051,14 +2046,6 @@ def setUp(self):
)
self.options_response = self.view(self.options_request)

def tearDown(self):
Node.objects.all().delete()
User.objects.all().delete()
Study.objects.all().delete()
Assay.objects.all().delete()
DataSet.objects.all().delete()
Investigation.objects.all().delete()

def test_unallowed_http_verbs(self):
self.assertEqual(
self.put_response.data['detail'], 'Method "PUT" not allowed.')
Expand Down
20 changes: 20 additions & 0 deletions refinery/core/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
'''

from django.conf.urls import patterns, url
from rest_framework.routers import DefaultRouter

from .views import (AnalysesViewSet, DataSetsViewSet, NodeGroups,
NodeViewSet, WorkflowViewSet)


urlpatterns = patterns(
Expand Down Expand Up @@ -83,3 +87,19 @@
url(r'^neo4j/annotations/$', 'neo4j_dataset_annotations',
name="neo4j_dataset_annotations")
)

# DRF url routing
core_router = DefaultRouter()
core_router.register(r'nodes', NodeViewSet)
core_router.register(r'workflows', WorkflowViewSet)
core_router.urls.extend([
url(r'^node_groups/$', NodeGroups.as_view()),
url(r'^data_sets/(?P<uuid>'
r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{'
r''r'12})/$',
DataSetsViewSet.as_view()),
url(r'^analyses/(?P<uuid>'
r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{'
r''r'12})/$',
AnalysesViewSet.as_view())
])
26 changes: 1 addition & 25 deletions refinery/data_set_manager/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
insert_facet_field_filter, is_field_in_hidden_list,
objectify_facet_field_counts, update_attribute_order_ranks)
from .views import Assays, AssaysAttributes
from core.management.commands.create_public_group import create_public_group
from core.models import DataSet, ExtendedGroup, InvestigationLink
from core.views import NodeViewSet
from file_store.models import FileStoreItem
Expand Down Expand Up @@ -99,8 +98,6 @@ class AssaysAttributesAPITests(APITestCase):
def setUp(self):
self.user1 = User.objects.create_user("ownerJane", '', 'test1234')
self.user2 = User.objects.create_user("guestName", '', 'test1234')
self.user1.save()
self.user2.save()
self.factory = APIRequestFactory()
investigation = Investigation.objects.create()
self.data_set = DataSet.objects.create(
Expand Down Expand Up @@ -609,15 +606,6 @@ def setUp(self):
self.valid_uuid = self.assay.uuid
self.invalid_uuid = 'xxxxxxxx'

def tearDown(self):
User.objects.all().delete()
Assay.objects.all().delete()
Study.objects.all().delete()
Investigation.objects.all().delete()
DataSet.objects.all().delete()
InvestigationLink.objects.all().delete()
AttributeOrder.objects.all().delete()

def test_objectify_facet_field_counts(self):
facet_field_array = {'WORKFLOW': ['1_test_04', 1,
'output_file', 60,
Expand Down Expand Up @@ -1396,9 +1384,6 @@ def test_get_auxiliary_file_generation_task_state(self):
class NodeApiV2Tests(APITestCase):

def setUp(self):

create_public_group()

self.public_group_name = ExtendedGroup.objects.public_group().name
self.username = 'coffee_lover'
self.password = 'coffeecoffee'
Expand Down Expand Up @@ -1459,24 +1444,15 @@ def setUp(self):
)
self.options_response = self.view(self.options_request)

def tearDown(self):
Node.objects.all().delete()
User.objects.all().delete()
Study.objects.all().delete()
Assay.objects.all().delete()
Investigation.objects.all().delete()

def test_get_request(self):
self.assertIsNotNone(self.get_response.data[0])

def test_get_request_anonymous_user(self):
self.client.logout()

self.new_get_request = self.factory.get(self.url_root)
self.new_get_response = self.view(self.new_get_request)
self.assertIsNotNone(self.new_get_response.data[0])
self.assertEqual(self.new_get_request.user.id,
None)
self.assertEqual(self.new_get_request.user.id, None)

def test_unallowed_http_verbs(self):
self.assertEqual(
Expand Down
16 changes: 15 additions & 1 deletion refinery/data_set_manager/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_exempt
from rest_framework.routers import DefaultRouter

from .views import (CheckDataFilesView, ChunkedFileUploadCompleteView,
from .views import (Assays, AssaysAttributes, AssaysFiles, CheckDataFilesView,
ChunkedFileUploadCompleteView,
ChunkedFileUploadView, DataSetImportView, ImportISATabView,
ProcessISATabView, ProcessMetadataTableView,
TakeOwnershipOfPublicDatasetView)
Expand Down Expand Up @@ -43,3 +45,15 @@
name='take_ownership_of_public_dataset'),

)

# DRF url routing
data_set_manager_router = DefaultRouter()
data_set_manager_router.urls.extend([
url(r'^assays/$', Assays.as_view()),
url(r'^assays/(?P<uuid>'
r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{'
r''r'12})/files/$', AssaysFiles.as_view()),
url(r'^assays/(?P<uuid>'
r'[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{'
r''r'12})/attributes/$', AssaysAttributes.as_view()),
])
61 changes: 56 additions & 5 deletions refinery/factory_boy/django_model_factories.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
from datetime import datetime
import uuid as uuid_builtin

import django
import factory

# Call to django.setup() needed due to the new handling of the AppRegistry in
# Django 1.7
django.setup()


class DataSetFactory(factory.django.DjangoModelFactory):
"""Minimal representation of a DataSet for testing purposes"""
Expand Down Expand Up @@ -89,3 +84,59 @@ class InvestigationFactory(NodeCollectionFactory):
"""Minimal representation of a Investigation for testing purposes"""
class Meta:
model = "data_set_manager.Investigation"


class ToolDefinitionFactory(factory.django.DjangoModelFactory):
"""Minimal representation of a ToolDefinition for testing purposes"""

class Meta:
model = "tool_manager.ToolDefinition"


class FileRelationshipFactory(factory.django.DjangoModelFactory):
"""Minimal representation of a FileRelationship for testing purposes"""

class Meta:
model = "tool_manager.FileRelationship"


class InputFileFactory(factory.django.DjangoModelFactory):
"""Minimal representation of an InputFile for testing purposes"""

class Meta:
model = "tool_manager.InputFile"


class ParameterFactory(factory.django.DjangoModelFactory):
"""Minimal representation of a Parameter for testing purposes"""

class Meta:
model = "tool_manager.Parameter"


class GalaxyParameterFactory(factory.django.DjangoModelFactory):
"""Minimal representation of a GalaxyParameter for testing purposes"""

class Meta:
model = "tool_manager.GalaxyParameter"


class OutputFileFactory(factory.django.DjangoModelFactory):
"""Minimal representation of an OutputFile for testing purposes"""

class Meta:
model = "tool_manager.OutputFile"


class FileTypeFactory(factory.django.DjangoModelFactory):
"""Minimal representation of a FileType for testing purposes"""

class Meta:
model = "file_store.FileType"


class FileExtensionFactory(factory.django.DjangoModelFactory):
"""Minimal representation of a FileExtension for testing purposes"""

class Meta:
model = "file_store.FileExtension"
12 changes: 6 additions & 6 deletions refinery/factory_boy/utils.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
from datetime import datetime
import uuid as uuid_builtin

from core.models import DataSet, Analysis
from core.models import Analysis, DataSet

from factory_boy.django_model_factories import DataSetFactory, \
InvestigationFactory, StudyFactory, InvestigationLinkFactory, \
GalaxyInstanceFactory, WorkflowEngineFactory, WorkflowFactory, \
ProjectFactory, AnalysisFactory
from factory_boy.django_model_factories import (
AnalysisFactory, DataSetFactory, GalaxyInstanceFactory,
InvestigationFactory, InvestigationLinkFactory, ProjectFactory,
StudyFactory, WorkflowEngineFactory, WorkflowFactory
)


def make_datasets(number_to_create, user_instance):
"""Create some minimal DataSets"""
while number_to_create:

create_dataset_with_necessary_models()
number_to_create -= 1

Expand Down
3 changes: 1 addition & 2 deletions refinery/file_store/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
from django.test import SimpleTestCase, TestCase

import mock
from rest_framework.test import APIRequestFactory
from rest_framework.test import APITestCase
from rest_framework.test import APIRequestFactory, APITestCase

from .models import (file_path, FILE_STORE_TEMP_DIR, FileExtension,
FileStoreItem, FileType,
Expand Down

0 comments on commit 1360dcd

Please sign in to comment.