fix broken unit test for ref timeseries aggregation user zone
@@ -5,10 +5,9 @@ from django.contrib.auth.models import Group
from django.conf import settings
from hs_core import hydroshare
-from hs_core.hydroshare.utils import resource_post_create_actions
from hs_core.testing import TestCaseCommonUtilities
from utils import assert_ref_time_series_file_type_metadata
-from hs_file_types.models import RefTimeseriesLogicalFile, GenericLogicalFile
+from hs_file_types.models import RefTimeseriesLogicalFile
class RefTimeSeriesFileTypeMetaDataTest(TestCaseCommonUtilities, TransactionTestCase):
@@ -77,10 +76,6 @@ class RefTimeSeriesFileTypeMetaDataTest(TestCaseCommonUtilities, TransactionTest
# test resource is created on federated zone
self.assertNotEqual(self.composite_resource.resource_federation_path, '')
-
- # set the logical file -which get sets as part of the post resource creation signal
- resource_post_create_actions(resource=self.composite_resource, user=self.user,
- metadata=self.composite_resource.metadata)
self.assertEqual(self.composite_resource.files.all().count(), 1)
res_file = self.composite_resource.files.first()
@@ -91,7 +86,7 @@ class RefTimeSeriesFileTypeMetaDataTest(TestCaseCommonUtilities, TransactionTest
self.assertEqual(os.path.join('data', 'contents', res_file.short_path), fed_file_path)
# set the tif file to RefTimeseries file type
- RefTimeseriesLogicalFile.set_file_type(self.composite_resource, res_file.id, self.user)
+ RefTimeseriesLogicalFile.set_file_type(self.composite_resource, self.user, res_file.id)
# test that the content of the json file is same is what we have
# saved in json_file_content field of the file metadata object
