def test_table_pandas_get(self): # Get the only workflow in the fixture workflow = Workflow.objects.all()[0] # Get the data through the API response = self.client.get( reverse('table:api_pops', kwargs={'wid': workflow.id})) # Transform the response into a data frame r_df = string_to_df(response.data['data_frame']) # Load the df from the db df = load_table(workflow.get_data_frame_table_name()) # Compare both elements self.compare_tables(r_df, df)
def test_table_pandas_merge_get(self): # Get the only workflow in the fixture workflow = Workflow.objects.all()[0] # Get the data through the API response = self.client.get( reverse('table:api_pmerge', kwargs={'pk': workflow.id})) # Transform new table into string r_df = serializers.string_to_df(response.data['src_df']) # Load the df from the db df = pandas_db.load_from_db(workflow.id) # Compare both elements and check wf df consistency self.compare_tables(r_df, df) workflow = Workflow.objects.all()[0] self.assertTrue(pandas_db.check_wf_df(workflow))