def test_analysis_calls_galaxy_file_import(self, galaxy_file_import_state_mock): request = self.request_factory.get(self.status_url_root, content_type="application/json") request.user = self.user analysis_status(request, self.analysis.uuid) self.assertTrue(galaxy_file_import_state_mock.called)
def test_analysis_calls_galaxy_file_import( self, galaxy_file_import_state_mock ): request = self.request_factory.get(self.status_url_root, content_type="application/json") request.user = self.user analysis_status(request, self.analysis.uuid) self.assertTrue(galaxy_file_import_state_mock.called)
def test_tool_analysis_calls_tool_based_galaxy_file_import_state( self, file_import_state_mock ): self.create_valid_tool(ToolDefinition.WORKFLOW) self.status_url_root = "/analysis_manager/{}/".format( self.tool.analysis.uuid ) request = self.request_factory.get( self.status_url_root, content_type="application/json", HTTP_X_REQUESTED_WITH='XMLHttpRequest' ) request.user = self.user response = analysis_status(request, self.tool.analysis.uuid) self.assertTrue(file_import_state_mock.called) self.assertEqual( json.loads(response.content), { "galaxyAnalysis": [], "refineryImport": [], "galaxyImport": "coffee", "overall": "INITIALIZED", "galaxyExport": [] } )
def test_analysis_returns_galaxy_file_import_state(self, get_status_mock): request = self.request_factory.get( self.status_url_root, content_type="application/json", ) request.user = self.user response = analysis_status(request, self.analysis.uuid) self.assertEqual( json.loads(response.content), { "galaxyAnalysis": [], "refineryImport": [], "galaxyImport": "SUCCESS", "overall": "INITIALIZED", "galaxyExport": [] })
def test_non_tool_analysis_calls_old_galaxy_file_import_state( self, file_import_state_mock): request = self.request_factory.get( self.status_url_root, content_type="application/json", HTTP_X_REQUESTED_WITH='XMLHttpRequest') request.user = self.user response = analysis_status(request, self.analysis.uuid) self.assertTrue(file_import_state_mock.called) self.assertEqual( json.loads(response.content), { "galaxyAnalysis": [], "refineryImport": [], "galaxyImport": "coffee", "overall": "INITIALIZED", "galaxyExport": [] })
def test_analysis_returns_galaxy_file_import_state( self, get_status_mock ): request = self.request_factory.get( self.status_url_root, content_type="application/json", ) request.user = self.user response = analysis_status(request, self.analysis.uuid) self.assertEqual( json.loads(response.content), { "galaxyAnalysis": [], "refineryImport": [], "galaxyImport": "SUCCESS", "overall": "INITIALIZED", "galaxyExport": [] } )