Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
aff2a5db
Commit
aff2a5db
authored
Nov 08, 2019
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure we find the file
parent
ba7158ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
test_default_controller.py
...a-flask-server/sure_tosca/test/test_default_controller.py
+8
-2
No files found.
sure_tosca-flask-server/sure_tosca/test/test_default_controller.py
View file @
aff2a5db
...
@@ -332,10 +332,16 @@ class TestDefaultController(BaseTestCase):
...
@@ -332,10 +332,16 @@ class TestDefaultController(BaseTestCase):
# 'Response body is : ' + response.data.decode('utf-8'))
# 'Response body is : ' + response.data.decode('utf-8'))
def
upload_file
(
self
):
def
upload_file
(
self
):
tosca_path
=
"../../../TOSCA/"
tosca_path
=
"../../../TOSCA/"
input_tosca_file_path
=
tosca_path
+
'/application_example_2_topologies.yaml'
input_tosca_file_path
=
tosca_path
+
'/application_example_2_topologies.yaml'
self
.
assertEqual
(
True
,
os
.
path
.
exists
(
input_tosca_file_path
),
if
not
os
.
path
.
exists
(
input_tosca_file_path
):
"Input TOSCA file: "
+
input_tosca_file_path
+
" not found"
)
tosca_path
=
"../TOSCA/"
input_tosca_file_path
=
tosca_path
+
'/application_example_2_topologies.yaml'
dir_path
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
self
.
assertEqual
(
True
,
os
.
path
.
exists
(
input_tosca_file_path
),
'Starting from: '
+
dir_path
+
' Input TOSCA file: '
+
input_tosca_file_path
+
' not found'
)
with
open
(
input_tosca_file_path
,
'r'
)
as
file
:
with
open
(
input_tosca_file_path
,
'r'
)
as
file
:
contents
=
file
.
read
()
contents
=
file
.
read
()
byte_contents
=
bytes
(
contents
,
'utf8'
)
byte_contents
=
bytes
(
contents
,
'utf8'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment