Skip to content

Commit 37149d4

Browse files
committed
chore(Compare and Comply): Regenerate C&C
1 parent baf4de7 commit 37149d4

File tree

2 files changed

+127
-117
lines changed

2 files changed

+127
-117
lines changed

test/integration/test_compare_comply_v1.py

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
from unittest import TestCase
77

88

9-
@pytest.mark.skip("Skip Compare and comply tests")
9+
@pytest.mark.skip('Skip Compare and comply tests')
1010
class IntegrationTestCompareComplyV1(TestCase):
1111
compare_comply = None
1212

1313
@classmethod
1414
def setup_class(cls):
1515
cls.compare_comply = watson_developer_cloud.CompareComplyV1(
16-
"2018-10-15",
16+
'2018-10-15',
1717
iam_apikey='YOUR IAM API KEY')
1818
cls.compare_comply.set_default_headers({
1919
'X-Watson-Learning-Opt-Out':
@@ -49,91 +49,91 @@ def test_compare_documents(self):
4949

5050
def test_feedback(self):
5151
feedback_data = {
52-
"feedback_type": "element_classification",
53-
"document": {
54-
"hash": "",
55-
"title": "doc title"
52+
'feedback_type': 'element_classification',
53+
'document': {
54+
'hash': '',
55+
'title': 'doc title'
5656
},
57-
"model_id": "contracts",
58-
"model_version": "11.00",
59-
"location": {
60-
"begin": "214",
61-
"end": "237"
57+
'model_id': 'contracts',
58+
'model_version': '11.00',
59+
'location': {
60+
'begin': '214',
61+
'end': '237'
6262
},
63-
"text": "1. IBM will provide a Senior Managing Consultant / expert resource, for up to 80 hours, to assist Florida Power & Light (FPL) with the creation of an IT infrastructure unit cost model for existing infrastructure.",
64-
"original_labels": {
65-
"types": [
63+
'text': '1. IBM will provide a Senior Managing Consultant / expert resource, for up to 80 hours, to assist Florida Power & Light (FPL) with the creation of an IT infrastructure unit cost model for existing infrastructure.',
64+
'original_labels': {
65+
'types': [
6666
{
67-
"label": {
68-
"nature": "Obligation",
69-
"party": "IBM"
67+
'label': {
68+
'nature': 'Obligation',
69+
'party': 'IBM'
7070
},
71-
"provenance_ids": [
72-
"85f5981a-ba91-44f5-9efa-0bd22e64b7bc",
73-
"ce0480a1-5ef1-4c3e-9861-3743b5610795"
71+
'provenance_ids': [
72+
'85f5981a-ba91-44f5-9efa-0bd22e64b7bc',
73+
'ce0480a1-5ef1-4c3e-9861-3743b5610795'
7474
]
7575
},
7676
{
77-
"label": {
78-
"nature": "End User",
79-
"party": "Exclusion"
77+
'label': {
78+
'nature': 'End User',
79+
'party': 'Exclusion'
8080
},
81-
"provenance_ids": [
82-
"85f5981a-ba91-44f5-9efa-0bd22e64b7bc",
83-
"ce0480a1-5ef1-4c3e-9861-3743b5610795"
81+
'provenance_ids': [
82+
'85f5981a-ba91-44f5-9efa-0bd22e64b7bc',
83+
'ce0480a1-5ef1-4c3e-9861-3743b5610795'
8484
]
8585
}
8686
],
87-
"categories": [
87+
'categories': [
8888
{
89-
"label": "Responsibilities",
90-
"provenance_ids": []
89+
'label': 'Responsibilities',
90+
'provenance_ids': []
9191
},
9292
{
93-
"label": "Amendments",
94-
"provenance_ids": []
93+
'label': 'Amendments',
94+
'provenance_ids': []
9595
}
9696
]
9797
},
98-
"updated_labels": {
99-
"types": [
98+
'updated_labels': {
99+
'types': [
100100
{
101-
"label": {
102-
"nature": "Obligation",
103-
"party": "IBM"
101+
'label': {
102+
'nature': 'Obligation',
103+
'party': 'IBM'
104104
}
105105
},
106106
{
107-
"label": {
108-
"nature": "Disclaimer",
109-
"party": "Buyer"
107+
'label': {
108+
'nature': 'Disclaimer',
109+
'party': 'Buyer'
110110
}
111111
}
112112
],
113-
"categories": [
113+
'categories': [
114114
{
115-
"label": "Responsibilities"
115+
'label': 'Responsibilities'
116116
},
117117
{
118-
"label": "Audits"
118+
'label': 'Audits'
119119
}
120120
]
121121
}
122122
}
123123

124124
add_feedback = self.compare_comply.add_feedback(
125125
feedback_data,
126-
"wonder woman",
127-
"test commment").get_result()
126+
'wonder woman',
127+
'test commment').get_result()
128128
assert add_feedback is not None
129-
assert add_feedback["feedback_id"] is not None
130-
feedback_id = add_feedback["feedback_id"]
129+
assert add_feedback['feedback_id'] is not None
130+
feedback_id = add_feedback['feedback_id']
131131

132132
get_feedback = self.compare_comply.get_feedback(feedback_id).get_result()
133133
assert get_feedback is not None
134134

135135
list_feedback = self.compare_comply.list_feedback(
136-
feedback_type="element_classification").get_result()
136+
feedback_type='element_classification').get_result()
137137
assert list_feedback is not None
138138

139139
delete_feedback = self.compare_comply.delete_feedback(feedback_id).get_result()
@@ -146,20 +146,20 @@ def test_batches(self):
146146
with open(os.path.join(os.path.dirname(__file__), '../../resources/cloud-object-storage-credentials-input.json'), 'rb') as input_credentials_file, \
147147
open(os.path.join(os.path.dirname(__file__), '../../resources/cloud-object-storage-credentials-output.json'), 'rb') as output_credentials_file:
148148
create_batch = self.compare_comply.create_batch(
149-
"html_conversion",
149+
'html_conversion',
150150
input_credentials_file,
151-
"us-south",
152-
"compare-comply-integration-test-bucket-input",
151+
'us-south',
152+
'compare-comply-integration-test-bucket-input',
153153
output_credentials_file,
154-
"us-south",
155-
"compare-comply-integration-test-bucket-output").get_result()
154+
'us-south',
155+
'compare-comply-integration-test-bucket-output').get_result()
156156

157157
assert create_batch is not None
158-
assert create_batch["batch_id"] is not None
159-
batch_id = create_batch["batch_id"]
158+
assert create_batch['batch_id'] is not None
159+
batch_id = create_batch['batch_id']
160160

161161
get_batch = self.compare_comply.get_batch(batch_id)
162162
assert get_batch is not None
163163

164-
update_batch = self.compare_comply.update_batch(batch_id, "rescan")
164+
update_batch = self.compare_comply.update_batch(batch_id, 'rescan')
165165
assert update_batch is not None

0 commit comments

Comments
 (0)