|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# snapshottest: v1 - https://goo.gl/zC4yUc |
| 3 | +from __future__ import unicode_literals |
| 4 | + |
| 5 | +from snapshottest import Snapshot |
| 6 | + |
| 7 | + |
| 8 | +snapshots = Snapshot() |
| 9 | + |
| 10 | +snapshots["TestResourcesStatusConverter::test_exhaustive_snapshot_cisu_to_rs 1"] = """{ |
| 11 | + "distributionID": "fr.health.samuA_2608323d-507d-4cbf-bf74-52007f8124ea", |
| 12 | + "senderID": "fr.health.samuA", |
| 13 | + "dateTimeSent": "2022-09-27T08:23:34+02:00", |
| 14 | + "dateTimeExpires": "2072-09-27T08:23:34+02:00", |
| 15 | + "distributionStatus": "Actual", |
| 16 | + "distributionKind": "Report", |
| 17 | + "descriptor": { |
| 18 | + "language": "fr-FR", |
| 19 | + "explicitAddress": { |
| 20 | + "explicitAddressScheme": "hubex", |
| 21 | + "explicitAddressValue": "fr.health.samuB" |
| 22 | + } |
| 23 | + }, |
| 24 | + "content": [ |
| 25 | + { |
| 26 | + "jsonContent": { |
| 27 | + "embeddedJsonContent": { |
| 28 | + "message": { |
| 29 | + "messageId": "2608323d-507d-4cbf-bf74-52007f8124ea", |
| 30 | + "sender": { |
| 31 | + "name": "samuA", |
| 32 | + "URI": "hubsante:fr.health.samuA" |
| 33 | + }, |
| 34 | + "sentAt": "2022-09-27T08:23:34+02:00", |
| 35 | + "status": "Actual", |
| 36 | + "kind": "Report", |
| 37 | + "recipient": [ |
| 38 | + { |
| 39 | + "name": "samuB", |
| 40 | + "URI": "hubsante:fr.health.samuB" |
| 41 | + } |
| 42 | + ], |
| 43 | + "resourcesStatus": { |
| 44 | + "caseId": "fr.health.samu440.DRFR154402413800236", |
| 45 | + "resourceId": "fr.health.samu440.resource.VLM2", |
| 46 | + "state": { |
| 47 | + "datetime": "2024-05-18T18:46:00+02:00", |
| 48 | + "status": "RETOUR", |
| 49 | + "availability": true |
| 50 | + } |
| 51 | + } |
| 52 | + } |
| 53 | + } |
| 54 | + } |
| 55 | + } |
| 56 | + ] |
| 57 | +}""" |
| 58 | + |
| 59 | +snapshots["TestResourcesStatusConverter::test_exhaustive_snapshot_rs_to_cisu 1"] = """{ |
| 60 | + "distributionID": "fr.health.samuA_2608323d-507d-4cbf-bf74-52007f8124ea", |
| 61 | + "senderID": "fr.health.samuA", |
| 62 | + "dateTimeSent": "2022-09-27T08:23:34+02:00", |
| 63 | + "dateTimeExpires": "2072-09-27T08:23:34+02:00", |
| 64 | + "distributionStatus": "Actual", |
| 65 | + "distributionKind": "Report", |
| 66 | + "descriptor": { |
| 67 | + "language": "fr-FR", |
| 68 | + "explicitAddress": { |
| 69 | + "explicitAddressScheme": "hubex", |
| 70 | + "explicitAddressValue": "fr.health.samuB" |
| 71 | + } |
| 72 | + }, |
| 73 | + "content": [ |
| 74 | + { |
| 75 | + "jsonContent": { |
| 76 | + "embeddedJsonContent": { |
| 77 | + "message": { |
| 78 | + "messageId": "2608323d-507d-4cbf-bf74-52007f8124ea", |
| 79 | + "sender": { |
| 80 | + "name": "samuA", |
| 81 | + "URI": "hubsante:fr.health.samuA" |
| 82 | + }, |
| 83 | + "sentAt": "2022-09-27T08:23:34+02:00", |
| 84 | + "status": "Actual", |
| 85 | + "kind": "Report", |
| 86 | + "recipient": [ |
| 87 | + { |
| 88 | + "name": "samuB", |
| 89 | + "URI": "hubsante:fr.health.samuB" |
| 90 | + } |
| 91 | + ], |
| 92 | + "resourcesStatusCisu": { |
| 93 | + "caseId": "fr.health.samu440.DRFR154402413800236", |
| 94 | + "resourceId": "fr.health.samu440.resource.VLM2", |
| 95 | + "state": { |
| 96 | + "datetime": "2024-05-18T18:46:00+02:00", |
| 97 | + "status": "RETOUR", |
| 98 | + "availability": true |
| 99 | + } |
| 100 | + } |
| 101 | + } |
| 102 | + } |
| 103 | + } |
| 104 | + } |
| 105 | + ] |
| 106 | +}""" |
| 107 | + |
| 108 | +snapshots["TestResourcesStatusConverter::test_required_snapshot_cisu_to_rs 1"] = """{ |
| 109 | + "distributionID": "fr.health.samuA_2608323d-507d-4cbf-bf74-52007f8124ea", |
| 110 | + "senderID": "fr.health.samuA", |
| 111 | + "dateTimeSent": "2022-09-27T08:23:34+02:00", |
| 112 | + "dateTimeExpires": "2072-09-27T08:23:34+02:00", |
| 113 | + "distributionStatus": "Actual", |
| 114 | + "distributionKind": "Report", |
| 115 | + "descriptor": { |
| 116 | + "language": "fr-FR", |
| 117 | + "explicitAddress": { |
| 118 | + "explicitAddressScheme": "hubex", |
| 119 | + "explicitAddressValue": "fr.health.samuB" |
| 120 | + } |
| 121 | + }, |
| 122 | + "content": [ |
| 123 | + { |
| 124 | + "jsonContent": { |
| 125 | + "embeddedJsonContent": { |
| 126 | + "message": { |
| 127 | + "messageId": "2608323d-507d-4cbf-bf74-52007f8124ea", |
| 128 | + "sender": { |
| 129 | + "name": "samuA", |
| 130 | + "URI": "hubsante:fr.health.samuA" |
| 131 | + }, |
| 132 | + "sentAt": "2022-09-27T08:23:34+02:00", |
| 133 | + "status": "Actual", |
| 134 | + "kind": "Report", |
| 135 | + "recipient": [ |
| 136 | + { |
| 137 | + "name": "samuB", |
| 138 | + "URI": "hubsante:fr.health.samuB" |
| 139 | + } |
| 140 | + ], |
| 141 | + "resourcesStatus": { |
| 142 | + "caseId": "fr.health.samu440.DRFR154402413800236", |
| 143 | + "resourceId": "fr.health.samu440.resource.VLM2", |
| 144 | + "state": { |
| 145 | + "datetime": "2024-05-18T18:46:00+02:00", |
| 146 | + "status": "ORIENTAT" |
| 147 | + } |
| 148 | + } |
| 149 | + } |
| 150 | + } |
| 151 | + } |
| 152 | + } |
| 153 | + ] |
| 154 | +}""" |
| 155 | + |
| 156 | +snapshots["TestResourcesStatusConverter::test_required_snapshot_rs_to_cisu 1"] = """{ |
| 157 | + "distributionID": "fr.health.samuA_2608323d-507d-4cbf-bf74-52007f8124ea", |
| 158 | + "senderID": "fr.health.samuA", |
| 159 | + "dateTimeSent": "2022-09-27T08:23:34+02:00", |
| 160 | + "dateTimeExpires": "2072-09-27T08:23:34+02:00", |
| 161 | + "distributionStatus": "Actual", |
| 162 | + "distributionKind": "Report", |
| 163 | + "descriptor": { |
| 164 | + "language": "fr-FR", |
| 165 | + "explicitAddress": { |
| 166 | + "explicitAddressScheme": "hubex", |
| 167 | + "explicitAddressValue": "fr.health.samuB" |
| 168 | + } |
| 169 | + }, |
| 170 | + "content": [ |
| 171 | + { |
| 172 | + "jsonContent": { |
| 173 | + "embeddedJsonContent": { |
| 174 | + "message": { |
| 175 | + "messageId": "2608323d-507d-4cbf-bf74-52007f8124ea", |
| 176 | + "sender": { |
| 177 | + "name": "samuA", |
| 178 | + "URI": "hubsante:fr.health.samuA" |
| 179 | + }, |
| 180 | + "sentAt": "2022-09-27T08:23:34+02:00", |
| 181 | + "status": "Actual", |
| 182 | + "kind": "Report", |
| 183 | + "recipient": [ |
| 184 | + { |
| 185 | + "name": "samuB", |
| 186 | + "URI": "hubsante:fr.health.samuB" |
| 187 | + } |
| 188 | + ], |
| 189 | + "resourcesStatusCisu": { |
| 190 | + "caseId": "fr.health.samu440.DRFR154402413800236", |
| 191 | + "resourceId": "fr.health.samu440.resource.VLM2", |
| 192 | + "state": { |
| 193 | + "datetime": "2024-05-18T18:46:00+02:00", |
| 194 | + "status": "ORIENTAT" |
| 195 | + } |
| 196 | + } |
| 197 | + } |
| 198 | + } |
| 199 | + } |
| 200 | + } |
| 201 | + ] |
| 202 | +}""" |
0 commit comments