From 4b5cc2eb25f9f91f9d47617cced23a162e948ea8 Mon Sep 17 00:00:00 2001 From: Kipchirchir Sigei Date: Fri, 22 Apr 2022 10:01:25 +0300 Subject: [PATCH] Update file paths Signed-off-by: Kipchirchir Sigei --- .../tests/viewsets/test_open_data_viewset.py | 2 +- .../transportation/transportation_1.xlsx | Bin 7806 -> 9585 bytes onadata/apps/main/tests/test_process.py | 23 +++++++++--------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/onadata/apps/api/tests/viewsets/test_open_data_viewset.py b/onadata/apps/api/tests/viewsets/test_open_data_viewset.py index 20e85a6897..88f2fdf025 100644 --- a/onadata/apps/api/tests/viewsets/test_open_data_viewset.py +++ b/onadata/apps/api/tests/viewsets/test_open_data_viewset.py @@ -458,7 +458,7 @@ def test_tableau_get_nested_repeat_group_data(self): # Create form with nested repeat groups xls_file_path = os.path.join( os.path.dirname(os.path.abspath(__file__)), - "../../../main/tests/fixtures/transportation/transportation.xlsx" + "../../../main/tests/fixtures/transportation/transportation_1.xlsx" ) self._publish_xls_file_and_set_xform(xls_file_path) diff --git a/onadata/apps/main/tests/fixtures/transportation/transportation_1.xlsx b/onadata/apps/main/tests/fixtures/transportation/transportation_1.xlsx index 047c81fb4484c858dfec6d39828fa4e162a3812e..29abc0fa1519bb89d34d33d3becdc9117cfcca84 100644 GIT binary patch literal 9585 zcmbVy1yq|`vo;W1TA)x|3&mZEI}{5PE$$R|x6tBV9Eubz?ry=|-Al0IR@}MJbMHO< zdcW_i_5YK#lDu#BJV|EHJbUk%c_#ya#ezaaM1-1Wk5`8JO;8@+>)IPzIxsOlJr_rh zNCQ~V0}s7IB0XGcu*Hlj!9ke;H>@S$?v^*t^wuY`CV4l@dXjjwW zS=IYSSRZKg-N?hwN?RB3V6=4}lz+Ztx^xq+8hGKCP?oH(e6X{V}YhgqI_2A(r;+Q?)E;i)2jh3-_Xf2K51e5jPTFB z>c;-2zTeijh_!%Yg4`!X&$@4#_&RHuJ8$mOTlXF{nU$brj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YVPX8@II zsfc#k6u7lgaKdaN6aG1FpkF|YA3aE~ z2ZTw?7}FP3$ti@)Kcj!QzKOYCjkQoM#>SUCstQ3Hyi{nZACQ91!|Tv;mLx@?r$fwq zI~ay^sTn>u)G)4Qm-z-r)|4RAV+&nK|c;@5D zkNA`Jj7@w@K<3n?zvfYJgmSlEe){MYykFLZ#6F$^rHzzP=0&EHpB8p<*u5l4;yDV9 zV~UChQU?OQ;>CQnAiG#X%AWT-?a;3;ne_`y)_32BOrO`SSft5ARM>$*{;vt=Bi`;K zbgF>BjjzY&V_tFT-BZ32{7M7{%(h610|VLhNVGEio z?eyLSuPJyju2-ql&%tMgTa&%Yj^NY<02+c6RhD4+TeRJG)K@ii`!k($CMgS64g- zwy^0AzES$I;Zvw5zBD8RMRu4&xV*QQrnU-|EB7ZwsT*Du(x{OUAKS-{3H4&+kM)?4>Y|w{9`^t z!{9>wYR~=NpL%T1{k#0utou{(_kPV|`|6hvJ^a<5&8$DQfA1VT_H=%U*h857OZ)E* z&!6hQ^XZT6g^5Mlql+3=^G-zm^X_WhSoJYe-;=l^i=e_HsRQF)|Fe@QjsPYeH% zIQ`Sg@8_C-w^H!nl!xc|)5=dS=1(iXZ&Ci;iur?w{)3gDC!#;C{9gSZw==(F`2nIw zO#ZdG`BU}xG=E$ke#s!gzaHT4#o|xp-=p-g68sX12N(Z`x}YovkMKAN_2JY15H;x} Hk9YqA1mt~L diff --git a/onadata/apps/main/tests/test_process.py b/onadata/apps/main/tests/test_process.py index b08f652863..6cd3497550 100644 --- a/onadata/apps/main/tests/test_process.py +++ b/onadata/apps/main/tests/test_process.py @@ -11,13 +11,13 @@ import pytz import requests +import openpyxl from django.conf import settings from django.core.files.uploadedfile import UploadedFile from django.urls import reverse from django_digest.test import Client as DigestClient from future.utils import iteritems from mock import patch -from openpyxl import load_workbook from onadata.apps.logger.models import XForm from onadata.apps.logger.models.xform import XFORM_TITLE_LENGTH @@ -94,7 +94,7 @@ def test_publish_xlsx_file(self): def test_google_url_upload(self, mock_urlopen, mock_requests): if self._internet_on(url="http://google.com"): xls_url = "https://docs.google.com/spreadsheet/pub?"\ - "key=0AvhZpT7ZLAWmdDhISGhqSjBOSl9XdXd5SHZHUUE2RFE&output=xls" + "key=0AvhZpT7ZLAWmdDhISGhqSjBOSl9XdXd5SHZHUUE2RFE&output=xlsx" pre_count = XForm.objects.count() path = os.path.join( @@ -109,7 +109,7 @@ def test_google_url_upload(self, mock_urlopen, mock_requests): "officedocument.spreadsheetml.sheet"), 'content-disposition': ( 'attachment; filename="transportation.' - 'xls"; filename*=UTF-8\'\'transportation.xlsx') + 'xlsx"; filename*=UTF-8\'\'transportation.xlsx') } mock_requests.get.return_value = mock_response mock_urlopen.return_value = xls_file @@ -215,7 +215,7 @@ def _publish_file(self, xls_path, strict=True): def _publish_xls_file(self): xls_path = os.path.join(self.this_directory, "fixtures", - "transportation", "transportation_1.xlsx") + "transportation", "transportation.xlsx") self._publish_file(xls_path) self.assertEqual(self.xform.id_string, "transportation_2011_07_25") @@ -465,11 +465,11 @@ def _check_xls_export(self): 'xls_export', kwargs={'username': self.user.username, 'id_string': self.xform.id_string}) response = self.client.get(xls_export_url) - expected_xls = load_workbook(os.path.join( + expected_xls = openpyxl.open(filename=os.path.join( self.this_directory, "fixtures", "transportation", - "transportation_export.xlsx")) + "transportation_export.xlsx"), data_only=True) content = get_response_content(response, decode=False) - actual_xls = load_workbook(filename=BytesIO(content)) + actual_xls = openpyxl.load_workbook(filename=BytesIO(content)) actual_sheet = actual_xls.get_sheet_by_name('data') expected_sheet = expected_xls.get_sheet_by_name('transportation') # check headers @@ -482,12 +482,13 @@ def _check_xls_export(self): self.assertEqual(len(list(actual_sheet.rows)), len(list(expected_sheet.rows))) for i in range(1, len(list(actual_sheet.columns))): - actual_row = list(actual_sheet.values)[i] - expected_row = list(expected_sheet.values)[i] + i = 1 + actual_row = list(list(actual_sheet.values)[i]) + expected_row = list(list(expected_sheet.values)[i]) # remove _id from result set, varies depending on the database - del list(actual_row)[23] - del list(expected_row)[23] + del actual_row[23] + del expected_row[23] self.assertEqual(actual_row, expected_row) def _check_delete(self):