Skip to content

Commit

Permalink
CTECH-1213 fix handling error condition (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
rizwansaeed committed May 9, 2022
1 parent 0ccf628 commit e3beb87
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sdk/tests/tutorials/ibor/test_cut_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def setUpClass(cls):
def test_cut_labels(self):
def get_guid():
return str(uuid.uuid4())[:4]

# define function to format cut labels
def cut_label_formatter(date, cut_label_code):
return str(date) + "N" + cut_label_code
Expand All @@ -56,10 +56,11 @@ def create_cut_label(hours, minutes, display_name, description, time_zone, code_
code_dict[request.display_name] = request.code

# Send the request to LUSID to create the cut label
result = None
try:
result = self.cut_labels.create_cut_label_definition(create_cut_label_definition_request=request)
result = self.cut_labels.create_cut_label_definition(create_cut_label_definition_request=request)
except ApiException:
pass
result = self.cut_labels.get_cut_label_definition(request.code)

# Check that result gives same details as input
self.assertEqual(result.display_name, display_name)
Expand Down

0 comments on commit e3beb87

Please sign in to comment.