Skip to content

Commit

Permalink
Update file paths
Browse files Browse the repository at this point in the history
Signed-off-by: Kipchirchir Sigei <[email protected]>
  • Loading branch information
KipSigei committed Apr 22, 2022
1 parent eb75502 commit ce12fa1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion onadata/apps/api/tests/viewsets/test_open_data_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions onadata/apps/main/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit ce12fa1

Please sign in to comment.