Skip to content

Commit 1504084

Browse files
committed
fix tests
1 parent 44275cb commit 1504084

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

sourceplusplus/models/instrument/common/LiveSourceLocation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ def from_json(cls, json_str):
2929

3030
@classmethod
3131
def from_dict(cls, dict_obj):
32-
return LiveSourceLocation(dict_obj["source"], dict_obj["line"],
32+
return LiveSourceLocation(dict_obj["source"],
33+
dict_obj["line"],
34+
dict_obj["service"] if "service" in dict_obj else None,
35+
dict_obj["service_instance"] if "service_instance" in dict_obj else None,
3336
dict_obj["commit_id"] if "commit_id" in dict_obj else None,
3437
dict_obj["file_checksum"] if "file_checksum" in dict_obj else None)

tests/instrument_serialization/tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ def test_serialize_breakpoint(self):
133133
"location": {
134134
"source": "File.py",
135135
"line": 1,
136+
"service": None,
137+
"serviceInstance": None,
136138
"commitId": None,
137139
"fileChecksum": None
138140
},
@@ -165,6 +167,8 @@ def test_serialize_log(self):
165167
"location": {
166168
"source": "File.py",
167169
"line": 1,
170+
"service": None,
171+
"serviceInstance": None,
168172
"commitId": None,
169173
"fileChecksum": None
170174
},

0 commit comments

Comments
 (0)