From 2f96c962a5d2862382dd14f3913d99e7d7f73065 Mon Sep 17 00:00:00 2001 From: ta264 Date: Tue, 8 Oct 2019 21:50:13 +0100 Subject: [PATCH] Fixed: Mock AcoustId responses so tests don't fail when API down --- .../Fingerprinting/AcoustidResponses.json | 26 ++++++++ .../FingerprintingServiceFixture.cs | 66 ++++++++++++------- 2 files changed, 68 insertions(+), 24 deletions(-) create mode 100644 src/NzbDrone.Core.Test/Files/Fingerprinting/AcoustidResponses.json diff --git a/src/NzbDrone.Core.Test/Files/Fingerprinting/AcoustidResponses.json b/src/NzbDrone.Core.Test/Files/Fingerprinting/AcoustidResponses.json new file mode 100644 index 000000000..729492cbd --- /dev/null +++ b/src/NzbDrone.Core.Test/Files/Fingerprinting/AcoustidResponses.json @@ -0,0 +1,26 @@ +[ + { + "requestContent": "1F-8B-08-00-00-00-00-00-00-03-15-54-CB-B6-B2-BC-12-7C-9B-6F-C6-59-5E-22-C2-60-0F-72-83-84-8B-21-20-2A-4E-58-8A-40-40-11-B7-BA-0D-F2-F4-3F-27-C3-4E-52-D5-5D-55-AB-8B-5B-53-DE-DF-3F-12-6E-2E-A6-D5-36-F3-E0-5F-D5-3F-BB-D3-FB-A7-7D-F5-F7-7F-5D-F9-3E-FD-3C-CB-A2-7F-5E-9A-7B-DD-5C-5E-FF-CE-A7-77-A1-7E-E6-FF-2E-7F-CF-D3-BB-E9-EF-FF-9B-FD-58-AB-7F-D5-74-5B-3E-1F-CF-E6-FE-9E-0A-50-42-DC-F5-5D-E2-D1-6F-12-6F-78-C2-F0-C9-1C-89-32-85-C8-55-9F-56-4F-60-15-1F-46-AC-A5-E1-C1-47-16-98-8E-D5-E3-90-7D-6E-35-30-7F-05-CB-AA-35-98-05-E6-E9-55-6C-F2-AA-9D-69-65-CF-4E-64-21-30-98-3B-D8-A0-43-35-E3-9F-08-F9-5F-66-FE-6E-84-1B-D0-FA-89-86-03-5E-6A-10-36-0E-5A-78-86-81-8B-12-14-D9-E1-11-68-F7-40-63-13-C4-6C-90-C3-76-0E-16-A5-E7-84-65-00-66-75-CE-92-73-AA-D6-CA-1C-C4-46-FD-91-A3-B1-DA-3C-06-E7-F9-D0-15-7E-26-3D-78-B4-39-F5-32-D6-97-EA-33-B6-25-2B-CE-77-E2-F6-82-2D-67-FB-88-66-25-1D-97-03-5F-2F-A2-D9-2B-88-37-13-36-B0-39-CA-F9-61-00-79-C3-56-5F-C7-60-E2-32-2C-9C-9E-5A-F1-CA-60-E1-42-79-9D-70-4C-E5-24-87-B1-89-D8-E5-3D-74-41-27-57-2F-3F-63-63-FF-E7-B4-B7-B0-BF-56-02-DD-8B-D7-89-DA-F3-2E-EA-65-1E-16-EF-2D-FE-8D-0F-36-A6-F7-B1-11-F9-A8-0A-1C-5D-F3-48-74-A2-1F-AD-BF-B9-2F-A4-69-34-EA-34-D6-27-A6-6D-71-8A-6E-03-FC-74-7E-45-54-FA-28-F6-2C-0F-37-67-F4-34-48-3F-2B-33-B6-7E-18-AB-E8-D7-89-D2-33-59-6D-FD-45-6F-3E-66-79-58-46-16-2F-84-9E-15-06-B3-CA-F8-38-E0-36-BE-37-D4-62-75-A4-6E-BE-3F-FC-76-57-D0-DE-4F-8D-E5-1D-91-B0-93-28-3C-FD-39-B4-14-6C-28-85-D3-E6-C6-E6-55-3B-97-13-1B-F8-38-58-51-38-CA-F8-25-AB-38-00-2E-FB-F4-CD-26-B8-EB-03-31-FF-A0-E1-0D-39-69-42-60-EC-D5-EA-8E-D2-49-1E-EB-43-C3-37-7A-9B-33-BD-D7-72-D9-A9-75-FF-A1-F3-08-77-27-16-5E-06-1B-36-22-B4-12-E7-10-56-3B-9C-F7-DB-9E-DC-4C-F0-FA-4D-5E-55-B3-41-FF-C7-C8-9B-2D-18-2A-83-58-17-65-46-ED-00-23-13-47-56-D5-CA-CA-AE-55-38-33-6D-9E-55-7A-A8-2C-BC-2A-E4-45-17-07-BC-32-70-B4-69-22-60-ED-91-AF-F2-06-D8-64-03-C8-68-62-6B-11-0F-56-27-D9-DA-D0-F5-78-7B-AD-76-64-BC-47-6A-04-11-1A-72-08-9F-C6-84-BD-43-2C-45-C6-89-C9-DB-65-D1-EF-2B-29-C8-5D-F4-7E-11-1C-D6-CD-1E-54-0C-39-45-35-B0-48-D4-93-D0-EF-9C-B5-D4-23-FD-AF-5D-F8-0C-80-FB-57-7E-2B-DC-A2-B2-DC-A1-08-EC-68-5A-7D-F8-47-73-FE-57-A6-D9-7E-EB-7D-1A-87-E5-B7-21-9F-B4-94-6B-ED-CE-5F-CD-59-6F-DC-60-DD-AB-DC-74-47-B9-75-7D-7E-75-3A-13-60-6A-CC-B7-4D-C6-72-53-EC-D9-41-E7-44-19-0B-32-F9-B6-AD-63-B0-EC-C4-A1-15-E2-2A-5C-75-BC-F8-2C-62-0D-FF-D4-DF-05-CB-67-83-77-7B-C9-29-33-7F-C0-AA-37-79-DE-C4-AB-BC-45-AC-5D-A7-A6-6E-76-EF-6F-6B-F7-65-27-46-2B-88-73-74-32-78-68-ED-0E-24-C2-DE-3C-42-F1-25-8C-BF-AA-B4-4E-D9-D1-60-D1-32-06-56-85-3E-17-5C-B2-D0-8E-D7-F2-53-02-4B-BD-FF-C2-3E-99-95-4D-6C-E4-ED-D0-93-6B-16-B4-7D-E9-D9-24-4D-F3-06-82-F1-09-C0-58-16-20-A7-22-2A-2E-DB-12-36-67-90-C6-51-14-E0-E8-FE-2A-EF-4D-1A-CC-88-C9-12-56-D9-43-3F-2E-35-FA-3A-EB-25-2F-8C-1D-CC-8D-2A-53-79-19-69-99-17-EE-4D-12-E3-F4-30-5A-C2-04-7D-1C-E8-66-AF-9F-F4-1B-85-E5-9C-5B-65-C4-C6-FC-2B-47-C3-22-53-FC-9E-FC-3C-F6-EB-3F-C7-E0-C5-5F-AF-AE-C7-03-7A-7C-99-65-B7-77-E8-39-13-CB-8A-44-76-BC-AA-D4-CC-21-4F-04-16-9D-7B-1A-5B-E3-7C-56-A3-49-F4-49-B9-89-FF-3B-CD-E0-EA-61-69-50-FE-3A-DF-95-A1-2F-99-00-59-32-71-58-42-BE-C6-21-0A-93-48-BD-AA-25-9B-32-38-6E-71-AC-F4-D3-AC-E7-D5-10-C1-B2-05-E0-3D-54-81-D2-A6-D7-44-CD-AB-3A-83-40-8D-37-F2-9D-1D-89-6A-57-9B-5F-DE-2F-0D-9D-A7-D0-C4-F7-85-EB-5F-4D-C5-DE-05-9C-B2-E6-31-50-90-4D-72-2D-59-62-7F-99-9D-0F-A0-F8-4A-F3-CB-CB-2E-5C-0D-A8-AC-06-9B-E1-5F-77-6B-08-36-0E-E2-44-74-59-05-95-7E-A0-EA-3B-ED-BB-28-B7-F1-B1-B7-AC-D7-9D-46-82-DD-0C-CA-EE-40-86-C9-C5-38-C0-CD-62-EA-C9-62-17-74-63-76-12-3C-C7-CE-64-CC-50-FE-EC-B2-EA-F0-53-F4-AD-6D-84-61-B9-54-4F-F5-2D-22-1A-B7-DA-36-B2-A2-F1-D8-30-81-5A-C5-F6-15-7F-84-5E-09-C1-DA-47-9B-CD-C1-97-B6-B3-6F-71-46-C3-31-3D-D0-1D-43-8B-15-7A-86-20-2C-84-C2-5A-63-4C-EA-76-5A-EA-0E-17-3D-E4-1C-73-99-40-D9-20-E2-D0-00-D2-53-96-86-E1-1B-FA-75-9A-40-8C-EE-B1-47-25-75-31-2C-61-1F-C7-5C-CA-5B-E3-C0-D7-2E-73-5D-E1-F3-82-66-10-F2-5D-5C-B7-35-F4-C8-C6-F5-33-9C-A2-9A-73-3F-D0-03-9E-D2-8A-77-C4-A5-38-FB-83-2F-0F-4D-EB-2C-41-CA-55-18-62-D7-F7-05-A5-69-CA-01-84-03-83-57-87-49-0A-E5-BE-94-1E-CC-78-E6-CA-14-D6-08-D5-1B-17-86-90-CA-10-A2-D8-D3-32-21-8B-1A-BB-90-87-50-A4-3C-53-12-F9-1A-B5-08-FB-DD-0D-73-04-21-4E-B3-2E-F3-8E-70-56-C7-A4-46-98-10-BD-97-45-0C-A7-13-7B-03-C4-BD-F3-87-20-12-D3-3B-AE-6F-D9-4A-02-A4-25-A4-53-CF-24-F3-8F-AE-D4-7D-CD-BF-52-27-10-39-9D-43-18-C1-D0-87-69-A8-FB-3E-9B-44-42-B4-86-38-A2-90-8A-B8-90-12-9C-20-AC-19-8A-D1-C3-71-42-8A-D3-3E-F5-E4-F1-05-60-9C-20-EA-D4-29-F3-45-EA-42-98-C9-95-1C-A0-FC-42-07-12-72-9B-B4-F4-C3-14-72-89-86-87-6C-11-09-38-DA-60-E8-FA-2F-8E-64-1C-CB-24-D1-ED-D5-B9-E2-88-50-41-25-4F-B5-EF-79-CD-57-43-A2-DE-CC-9D-FC-98-7A-41-30-19-E2-18-0D-A8-C6-C4-41-D0-CF-F6-10-5E-F9-44-23-25-82-D7-00-39-14-FA-94-97-03-CD-06-99-29-07-D5-AA-81-94-50-8C-21-0A-E5-34-B5-9A-4F-F6-C2-E9-F3-B4-BB-69-7A-9C-4A-50-3F-86-0C-12-67-84-1C-52-2E-A9-BE-42-C9-A1-A7-F4-F7-46-6F-8A-6F-12-11-52-0A-B5-AE-6B-6F-97-C0-96-B5-35-92-9C-16-A1-2C-52-18-23-2F-DE-5A-D0-47-F5-E4-90-EB-87-1C-22-3E-F1-EE-B4-82-18-3A-67-1F-C2-94-C2-A2-80-31-D0-5D-7C-83-2D-6E-28-75-43-77-8A-0B-94-D9-11-27-78-8B-F9-1D-C9-FF-00-37-12-B7-2F-AA-08-00-00", + "response": "{\"fingerprints\": [{\"index\": \"0\", \"results\": [{\"id\": \"a9b004fe-e161-417c-9f9e-443e4525334d\", \"recordings\": [{\"id\": \"209a4536-97ac-4e8a-aff1-1d39d029044b\"}, {\"id\": \"30f3f33e-8d0c-4e69-8539-cbd701d18f28\"}], \"score\": 0.940997}, {\"id\": \"fe0a9bec-2633-4c37-89be-b5d295b68a00\", \"score\": 0.763876}, {\"id\": \"18eab869-51dc-4948-83f7-4d8d441d5a1b\", \"score\": 0.490447}]}], \"status\": \"ok\"}" + }, + { + "requestContent": "1F-8B-08-00-00-00-00-00-00-03-15-54-CB-B6-B2-BC-12-7C-9B-6F-C6-59-5E-22-C2-60-0F-72-83-84-8B-21-20-2A-4E-58-8A-40-40-11-B7-BA-0D-F2-F4-3F-27-C3-4E-52-D5-5D-55-AB-8B-5B-53-DE-DF-3F-12-6E-2E-A6-D5-36-F3-E0-5F-D5-3F-BB-D3-FB-A7-7D-F5-F7-7F-5D-F9-3E-FD-3C-CB-A2-7F-5E-9A-7B-DD-5C-5E-FF-CE-A7-77-A1-7E-E6-FF-2E-7F-CF-D3-BB-E9-EF-FF-9B-FD-58-AB-7F-D5-74-5B-3E-1F-CF-E6-FE-9E-0A-50-42-DC-F5-5D-E2-D1-6F-12-6F-78-C2-F0-C9-1C-89-32-85-C8-55-9F-56-4F-60-15-1F-46-AC-A5-E1-C1-47-16-98-8E-D5-E3-90-7D-6E-35-30-7F-05-CB-AA-35-98-05-E6-E9-55-6C-F2-AA-9D-69-65-CF-4E-64-21-30-98-3B-D8-A0-43-35-E3-9F-08-F9-5F-66-FE-6E-84-1B-D0-FA-89-86-03-5E-6A-10-36-0E-5A-78-86-81-8B-12-14-D9-E1-11-68-F7-40-63-13-C4-6C-90-C3-76-0E-16-A5-E7-84-65-00-66-75-CE-92-73-AA-D6-CA-1C-C4-46-FD-91-A3-B1-DA-3C-06-E7-F9-D0-15-7E-26-3D-78-B4-39-F5-32-D6-97-EA-33-B6-25-2B-CE-77-E2-F6-82-2D-67-FB-88-66-25-1D-97-03-5F-2F-A2-D9-2B-88-37-13-36-B0-39-CA-F9-61-00-79-C3-56-5F-C7-60-E2-32-2C-9C-9E-5A-F1-CA-60-E1-42-79-9D-70-4C-E5-24-87-B1-89-D8-E5-3D-74-41-27-57-2F-3F-63-63-FF-E7-B4-B7-B0-BF-56-02-DD-8B-D7-89-DA-F3-2E-EA-65-1E-16-EF-2D-FE-8D-0F-36-A6-F7-B1-11-F9-A8-0A-1C-5D-F3-48-74-A2-1F-AD-BF-B9-2F-A4-69-34-EA-34-D6-27-A6-6D-71-8A-6E-03-FC-74-7E-45-54-FA-28-F6-2C-0F-37-67-F4-34-48-3F-2B-33-B6-7E-18-AB-E8-D7-89-D2-33-59-6D-FD-45-6F-3E-66-79-58-46-16-2F-84-9E-15-06-B3-CA-F8-38-E0-36-BE-37-D4-62-75-A4-6E-BE-3F-FC-76-57-D0-DE-4F-8D-E5-1D-91-B0-93-28-3C-FD-39-B4-14-6C-28-85-D3-E6-C6-E6-55-3B-97-13-1B-F8-38-58-51-38-CA-F8-25-AB-38-00-2E-FB-F4-CD-26-B8-EB-03-31-FF-A0-E1-0D-39-69-42-60-EC-D5-EA-8E-D2-49-1E-EB-43-C3-37-7A-9B-33-BD-D7-72-D9-A9-75-FF-A1-F3-08-77-27-16-5E-06-1B-36-22-B4-12-E7-10-56-3B-9C-F7-DB-9E-DC-4C-F0-FA-4D-5E-55-B3-41-FF-C7-C8-9B-2D-18-2A-83-58-17-65-46-ED-00-23-13-47-56-D5-CA-CA-AE-55-38-33-6D-9E-55-7A-A8-2C-BC-2A-E4-45-17-07-BC-32-70-B4-69-22-60-ED-91-AF-F2-06-D8-64-03-C8-68-62-6B-11-0F-56-27-D9-DA-D0-F5-78-7B-AD-76-64-BC-47-6A-04-11-1A-72-08-9F-C6-84-BD-43-2C-45-C6-89-C9-DB-65-D1-EF-2B-29-C8-5D-F4-7E-11-1C-D6-CD-1E-54-0C-39-45-35-B0-48-D4-93-D0-EF-9C-B5-D4-23-FD-AF-5D-F8-0C-80-FB-57-7E-2B-DC-A2-B2-DC-A1-08-EC-68-5A-7D-F8-47-73-FE-57-A6-D9-7E-EB-7D-1A-87-E5-B7-21-9F-B4-94-6B-ED-CE-5F-CD-59-6F-DC-60-DD-AB-DC-74-47-B9-75-7D-7E-75-3A-13-60-6A-CC-B7-4D-C6-72-53-EC-D9-41-E7-44-19-0B-32-F9-B6-AD-63-B0-EC-C4-A1-15-E2-2A-5C-75-BC-F8-2C-62-0D-FF-D4-DF-05-CB-67-83-77-7B-C9-29-33-7F-C0-AA-37-79-DE-C4-AB-BC-45-AC-5D-A7-A6-6E-76-EF-6F-6B-F7-65-27-46-2B-88-73-74-32-78-68-ED-0E-24-C2-DE-3C-42-F1-25-8C-BF-AA-B4-4E-D9-D1-60-D1-32-06-56-85-3E-17-5C-B2-D0-8E-D7-F2-53-02-4B-BD-FF-C2-3E-99-95-4D-6C-E4-ED-D0-93-6B-16-B4-7D-E9-D9-24-4D-F3-06-82-F1-09-C0-58-16-20-A7-22-2A-2E-DB-12-36-67-90-C6-51-14-E0-E8-FE-2A-EF-4D-1A-CC-88-C9-12-56-D9-43-3F-2E-35-FA-3A-EB-25-2F-8C-1D-CC-8D-2A-53-79-19-69-99-17-EE-4D-12-E3-F4-30-5A-C2-04-7D-1C-E8-66-AF-9F-F4-1B-85-E5-9C-5B-65-C4-C6-FC-2B-47-C3-22-53-FC-9E-FC-3C-F6-EB-3F-C7-E0-C5-5F-AF-AE-C7-03-7A-7C-99-65-B7-77-E8-39-13-CB-8A-44-76-BC-AA-D4-CC-21-4F-04-16-9D-7B-1A-5B-E3-7C-56-A3-49-F4-49-B9-89-FF-3B-CD-E0-EA-61-69-50-FE-3A-DF-95-A1-2F-99-00-59-32-71-58-42-BE-C6-21-0A-93-48-BD-AA-25-9B-32-38-6E-71-AC-F4-D3-AC-E7-D5-10-C1-B2-05-E0-3D-54-81-D2-A6-D7-44-CD-AB-3A-83-40-8D-37-F2-9D-1D-89-6A-57-9B-5F-DE-2F-0D-9D-A7-D0-C4-F7-85-EB-5F-4D-C5-DE-05-9C-B2-E6-31-50-90-4D-72-2D-59-62-7F-99-9D-0F-A0-F8-4A-F3-CB-CB-2E-5C-0D-A8-AC-06-9B-E1-5F-77-6B-08-36-0E-E2-44-74-59-05-95-7E-A0-EA-3B-ED-BB-28-B7-F1-B1-B7-AC-D7-9D-46-82-DD-0C-CA-EE-40-86-C9-C5-38-C0-CD-62-EA-C9-62-17-74-63-76-12-3C-C7-CE-64-CC-50-FE-EC-B2-EA-F0-53-F4-AD-6D-84-61-B9-54-4F-F5-2D-22-1A-B7-DA-36-B2-A2-F1-D8-30-81-5A-C5-F6-15-7F-84-5E-09-C1-DA-47-9B-CD-C1-97-B6-B3-6F-71-46-C3-31-3D-D0-1D-43-8B-15-7A-86-20-2C-84-C2-5A-63-4C-EA-76-5A-EA-0E-17-3D-E4-1C-73-99-40-D9-20-E2-D0-00-D2-53-96-86-E1-1B-FA-75-9A-40-8C-EE-B1-47-25-75-31-2C-61-1F-C7-5C-CA-5B-E3-C0-D7-2E-73-5D-E1-F3-82-66-10-F2-5D-5C-B7-35-F4-C8-C6-F5-33-9C-A2-9A-73-3F-D0-03-9E-D2-8A-77-C4-A5-38-FB-83-2F-0F-4D-EB-2C-41-CA-55-18-62-D7-F7-05-A5-69-CA-01-84-03-83-57-87-49-0A-E5-BE-94-1E-CC-78-E6-CA-14-D6-08-D5-1B-17-86-90-CA-10-A2-D8-D3-32-21-8B-1A-BB-90-87-50-A4-3C-53-12-F9-1A-B5-08-FB-DD-0D-73-04-21-4E-B3-2E-F3-8E-70-56-C7-A4-46-98-10-BD-97-45-0C-A7-13-7B-03-C4-BD-F3-87-20-12-D3-3B-AE-6F-D9-4A-02-A4-25-A4-53-CF-24-F3-8F-AE-D4-7D-CD-BF-52-27-10-39-9D-43-18-C1-D0-87-69-A8-FB-3E-9B-44-42-B4-86-38-A2-90-8A-B8-90-12-9C-20-AC-19-8A-D1-C3-71-42-8A-D3-3E-F5-E4-F1-05-60-9C-20-EA-D4-29-F3-45-EA-42-98-C9-95-1C-A0-FC-42-07-12-72-9B-B4-F4-C3-14-72-89-86-87-6C-11-09-38-DA-60-E8-FA-2F-8E-64-1C-CB-24-D1-ED-D5-B9-E2-88-50-41-25-4F-B5-EF-79-CD-57-43-A2-DE-CC-9D-FC-98-7A-41-30-19-E2-18-0D-A8-C6-C4-41-D0-CF-F6-10-5E-F9-44-23-25-82-D7-00-39-14-FA-94-97-03-CD-06-99-29-07-D5-AA-81-94-50-8C-21-0A-E5-34-B5-9A-4F-F6-C2-E9-F3-B4-BB-69-7A-9C-4A-50-3F-86-0C-12-67-84-1C-52-2E-A9-BE-42-C9-A1-A7-F4-F7-46-6F-8A-6F-12-11-52-0A-B5-AE-6B-6F-97-C0-96-B5-35-92-9C-16-A1-2C-52-18-23-2F-DE-5A-D0-47-F5-E4-90-EB-87-1C-22-3E-F1-EE-B4-82-18-3A-67-1F-C2-94-C2-A2-80-31-D0-5D-7C-83-2D-6E-28-75-43-77-8A-0B-94-D9-11-27-78-8B-F9-1D-C9-FF-00-37-12-B7-2F-AA-08-00-00", + "response": "{\"fingerprints\": [{\"index\": \"0\", \"results\": [{\"id\": \"a9b004fe-e161-417c-9f9e-443e4525334d\", \"recordings\": [{\"id\": \"209a4536-97ac-4e8a-aff1-1d39d029044b\"}, {\"id\": \"30f3f33e-8d0c-4e69-8539-cbd701d18f28\"}], \"score\": 0.940997}, {\"id\": \"fe0a9bec-2633-4c37-89be-b5d295b68a00\", \"score\": 0.763876}, {\"id\": \"18eab869-51dc-4948-83f7-4d8d441d5a1b\", \"score\": 0.490447}]}], \"status\": \"ok\"}" + }, + { + "requestContent": "1F-8B-08-00-00-00-00-00-00-03-ED-96-CB-B6-AA-30-12-86-DF-E6-CC-E8-E5-25-22-0E-CE-20-37-48-40-0C-01-51-71-C2-52-04-02-8A-B8-BD-05-78-FA-A6-47-7D-19-F7-70-67-46-42-AA-2A-7F-FD-AB-D6-97-DD-AA-FC-FE-FE-2B-E1-E6-62-5A-75-35-5D-FF-29-DA-67-73-7A-FF-AD-5F-ED-FD-4F-93-BF-4F-7F-9F-79-D6-3E-2F-D5-BD-AC-2E-AF-3F-E7-D3-3B-53-7F-A7-7F-2E-9F-E7-E9-5D-B5-F7-7F-4C-FE-5A-8B-3F-C5-78-9A-3F-1F-CF-EA-FE-1E-37-A0-84-B8-69-9B-C8-A5-7D-14-6E-78-C4-F0-C9-1C-88-32-85-48-55-1B-17-4F-60-65-5F-46-AC-B9-E1-C2-47-B2-36-6D-AB-C5-3E-FB-DE-4A-60-FE-08-96-14-4B-30-59-9B-A7-57-B6-49-8B-7A-A2-D5-6A-72-22-33-81-C1-D4-C6-06-ED-8A-09-FF-06-C8-EB-99-F9-B3-11-CE-9A-96-4F-D4-1D-F0-5C-03-BF-B2-D1-CC-35-0C-9C-E5-20-4B-0E-8F-B5-76-0E-34-34-41-C8-3A-D9-6D-A7-60-96-BB-B6-9F-AF-C1-A4-4C-59-74-8E-D5-52-99-9D-D8-A8-0F-39-1A-8B-CD-A3-B3-9F-0F-5D-E0-67-D4-82-47-9D-52-37-61-6D-AE-BE-43-9D-B3-EC-7C-27-4E-2B-D8-7C-B2-0F-68-92-D3-61-DE-F1-E5-2C-98-BC-D6-E1-66-8C-0D-56-1C-A5-FC-D0-81-B4-62-8B-DE-36-98-B8-74-33-BB-A5-56-B8-30-98-3F-53-6E-23-6C-53-D9-D1-61-A8-02-76-79-77-CD-BA-91-8B-97-97-B0-A1-FD-D8-F5-CD-6F-AF-85-40-F7-EC-75-A2-AB-69-13-B4-32-F5-B3-F7-16-FF-84-87-15-A6-F7-A1-12-E9-A0-32-1C-5C-D3-40-34-A2-1D-AC-CF-D4-13-D2-34-2A-75-1A-CA-13-D3-2B-71-0A-6E-1D-FC-36-5E-41-54-FC-C8-F6-2C-F5-37-67-F4-34-48-3B-C9-13-B6-7C-18-8B-E0-C7-0E-E2-33-59-6C-BD-59-6B-3E-26-A9-9F-07-16-CF-84-9E-64-06-B3-F2-F0-D8-E1-3A-BC-57-D4-62-65-A0-6E-9E-D7-FD-34-57-50-DF-4F-95-E5-1E-91-58-45-81-7F-FA-D8-34-17-AC-CB-85-5D-A7-C6-E6-55-DA-97-13-EB-F8-D0-59-81-3F-C8-F0-25-8B-70-0D-1C-F6-6D-AB-CD-FA-AE-0F-C4-FC-40-C3-ED-52-52-F9-C0-D8-AB-C5-1D-C5-A3-3C-D6-97-FA-6F-F4-36-27-7A-AF-E5-BC-51-CB-F6-4B-A7-01-6E-4E-CC-BF-74-2B-58-09-DF-8A-EC-83-5F-EC-70-DA-6E-5B-72-33-C1-EB-27-7A-15-D5-06-FD-2B-46-5A-6D-41-57-18-C4-BA-28-33-A8-3B-18-98-38-B0-8A-5A-16-AB-52-F9-13-73-C5-93-42-77-85-85-17-99-BC-E8-EC-80-17-06-0E-36-55-00-AC-3D-F2-54-5A-81-15-D9-00-32-98-D8-9A-85-9D-D5-48-B6-34-74-39-DC-5E-8B-1D-19-EE-81-1A-40-80-BA-14-C2-A7-31-C6-DE-21-16-23-E3-C4-E4-ED-32-6B-F7-85-14-E4-2E-5A-2F-5B-1F-96-D5-1E-14-0C-D9-59-D1-B1-40-94-A3-D0-EF-94-D5-D4-25-ED-CF-2A-F3-18-00-F7-5E-F6-05-AE-51-9E-EF-50-00-76-34-2E-BE-FC-AB-39-FF-E4-71-B2-DF-BA-DF-CA-66-E9-AD-4B-47-2D-E5-52-3B-D3-57-75-D6-1B-67-BD-6C-55-6A-3A-83-DC-3A-1E-BF-DA-8D-09-30-35-A6-DB-2A-61-A9-29-F6-EC-A0-53-A2-8C-19-19-FB-B6-2D-43-30-6F-C4-A1-16-E2-2A-1C-75-BC-78-2C-60-15-FF-96-FD-8C-A5-93-CE-BD-BD-E4-E8-99-0F-B0-CA-4D-9A-56-E1-22-AD-11-AB-97-B1-A9-AB-DD-BB-AF-57-6D-DE-88-C1-5A-87-29-3A-19-DC-B7-76-07-12-60-77-1A-A0-F0-E2-87-BD-CA-AD-53-72-34-58-30-0F-81-55-A0-EF-05-E7-CC-5F-85-4B-F9-CD-81-A5-DE-1F-BF-8D-26-79-15-1A-69-DD-B5-E4-9A-AC-EB-36-77-57-24-8E-D3-0A-82-E1-09-C0-90-67-20-A5-22-C8-2E-DB-1C-56-67-10-87-41-B0-C6-C1-FD-95-DF-AB-78-3D-21-26-8B-58-B1-EA-DA-61-AE-51-6F-2F-E7-3C-33-76-30-35-8A-44-A5-79-A0-65-9A-39-37-49-8C-D3-C3-A8-09-13-F4-71-A0-9B-BD-7E-D2-3E-F0-F3-29-B7-F2-80-0D-69-2F-07-C3-22-A3-FD-9E-FC-3C-B4-CB-8F-6D-F0-EC-D3-AA-EB-F1-80-1E-3D-B3-56-F5-1D-BA-F6-98-65-41-82-55-B8-28-D4-C4-26-4F-04-66-8D-73-1A-6A-E3-7C-56-83-49-F4-49-39-91-F7-33-BE-C1-D1-DD-DC-A0-FC-75-BE-2B-43-5F-12-01-92-68-CC-61-09-F9-1A-BA-C0-8F-02-F5-2A-E6-6C-F4-E0-B0-C5-A1-D2-4F-B3-9C-16-5D-00-F3-1A-80-77-57-AC-95-36-DD-2A-A8-5E-C5-19-AC-D5-70-23-FD-E4-48-54-BD-D8-FC-F0-76-6E-E8-34-86-26-BE-CF-1C-EF-6A-2A-F6-CE-E0-E8-35-97-81-8C-6C-A2-6B-CE-A2-55-CF-56-69-07-B2-5E-9A-3D-CF-1B-7F-D1-A1-BC-E8-56-0C-FF-38-5B-43-B0-A1-13-27-A2-F3-62-5D-E8-07-2A-FA-71-DE-05-E9-0A-1F-5B-CB-7A-DD-69-20-D8-CD-A0-EC-0E-A4-1F-5D-8C-03-DC-CC-C6-9A-2C-76-41-37-B6-8A-D6-CF-A1-31-19-33-94-37-B9-2C-1A-FC-14-6D-BD-32-7C-3F-9F-AB-A7-EA-B3-80-86-B5-5E-19-49-56-B9-AC-1B-83-5A-D9-F6-15-7E-85-5E-08-C1-EA-47-9D-4C-41-4F-EB-49-9F-9D-51-77-8C-0F-74-C7-D0-6C-81-9E-3E-F0-33-A1-B0-D6-18-93-B2-1E-87-BA-CD-45-0B-39-C7-5C-46-50-56-88-D8-74-0D-E9-29-89-7D-FF-0D-BD-32-8E-20-46-F7-D0-A5-92-3A-18-E6-B0-0D-43-2E-E5-AD-B2-E1-6B-97-38-8E-F0-78-46-13-08-F9-2E-2C-EB-12-BA-64-E3-78-09-8E-51-C9-B9-B7-D6-1D-1E-DD-8A-77-C4-A1-38-F9-C0-97-8B-C6-71-16-21-E5-28-0C-B1-E3-79-82-D2-38-E6-00-C2-8E-C1-AB-CD-24-85-72-9F-4B-17-26-3C-71-64-0C-4B-84-CA-8D-03-7D-48-A5-0F-51-E8-6A-19-91-59-89-1D-C8-7D-28-62-9E-28-89-3C-8D-6A-84-BD-E6-86-39-82-10-C7-49-93-B8-47-38-29-43-52-22-4C-88-DE-CB-2C-84-E3-0A-DD-0E-E2-D6-FE-20-88-C4-F8-1F-D7-B7-64-21-01-D2-12-D2-B1-66-92-78-47-47-EA-B6-E4-BD-D4-11-44-76-63-13-46-30-F4-60-EC-EB-B6-4D-46-91-10-2D-21-0E-28-A4-22-CC-A4-04-27-08-4B-86-42-F4-B0-6D-9F-E2-B8-8D-5D-79-7C-01-18-46-88-DA-65-CC-3C-11-3B-10-26-72-21-3B-28-7B-68-43-42-6E-A3-96-9E-1F-43-2E-51-F7-90-35-22-6B-8E-36-18-3A-DE-8B-23-19-86-32-8A-74-7D-B5-AF-38-20-54-50-C9-63-ED-B9-6E-D5-6B-48-D4-9B-39-63-3F-C6-5A-10-8C-BA-30-44-1D-2A-31-B1-11-F4-92-3D-84-57-3E-A6-91-12-C1-EB-1A-D9-14-7A-94-E7-1D-4D-3A-99-28-1B-95-AA-82-94-50-8C-21-F2-E5-F8-6A-35-1D-DB-0B-C7-CB-E3-EC-A6-F1-71-DC-82-FA-D1-25-90-D8-03-E4-90-72-49-F5-15-4A-0E-5D-A5-FB-1B-BD-29-BE-89-84-4F-29-D4-BA-2C-DD-5D-04-6B-56-97-48-72-9A-F9-32-8B-61-88-DC-70-6B-41-0F-95-63-87-1C-CF-E7-10-F1-31-EF-4E-2B-88-A1-7D-F6-20-8C-29-CC-32-18-02-DD-84-37-58-E3-8A-52-C7-77-46-BB-40-99-1C-71-84-B7-98-DF-91-FC-37-72-4C-FF-17-39-A6-BF-C8-F1-8B-1C-BF-C8-F1-8B-1C-BF-C8-F1-8B-1C-BF-C8-F1-8B-1C-FF-77-E4-98-FD-9D-FE-17-71-CC-FE-FE-C7-D7-3F-01-83-40-10-23-44-11-00-00", + "response": "{\"fingerprints\": [{\"index\": \"0\", \"results\": [{\"id\": \"a9b004fe-e161-417c-9f9e-443e4525334d\", \"recordings\": [{\"id\": \"209a4536-97ac-4e8a-aff1-1d39d029044b\"}, {\"id\": \"30f3f33e-8d0c-4e69-8539-cbd701d18f28\"}], \"score\": 0.940997}, {\"id\": \"fe0a9bec-2633-4c37-89be-b5d295b68a00\", \"score\": 0.763876}, {\"id\": \"18eab869-51dc-4948-83f7-4d8d441d5a1b\", \"score\": 0.490447}]}, {\"index\": \"1\", \"results\": [{\"id\": \"a9b004fe-e161-417c-9f9e-443e4525334d\", \"recordings\": [{\"id\": \"209a4536-97ac-4e8a-aff1-1d39d029044b\"}, {\"id\": \"30f3f33e-8d0c-4e69-8539-cbd701d18f28\"}], \"score\": 0.940997}, {\"id\": \"fe0a9bec-2633-4c37-89be-b5d295b68a00\", \"score\": 0.763876}, {\"id\": \"18eab869-51dc-4948-83f7-4d8d441d5a1b\", \"score\": 0.490447}]}], \"status\": \"ok\"}" + }, + { + "requestContent": "1F-8B-08-00-00-00-00-00-00-03-4D-C9-3B-0A-80-30-0C-00-D0-DB-64-14-BB-88-4B-06-77-11-3C-42-EC-47-53-6C-2A-69-BC-BF-1D-1D-1F-CF-DF-1C-C5-70-5F-B6-30-CD-99-DD-0A-A9-6A-21-C3-DC-AA-40-89-46-A8-D1-57-0D-2C-27-87-06-07-99-BF-D0-41-78-95-8C-AB-0C-23-8E-90-7A-46-7D-94-C5-BA-7F-FA-00-8B-C4-FF-AB-5E-00-00-00", + "response": "{\"error\": {\"code\": 2, \"message\": \"missing required parameter \\\"duration.0\\\"\"}, \"status\": \"error\"}" + }, + { + "requestContent": "1F-8B-08-00-00-00-00-00-00-03-ED-96-CB-D2-B2-BA-12-86-EF-E6-9F-B1-CA-43-44-1C-FC-83-9C-20-01-31-04-44-C5-09-A5-08-04-14-F1-F3-14-E0-EA-37-7B-B4-AB-F6-78-0D-BF-0C-73-E8-EE-BC-FD-56-D7-93-DD-AA-FC-FE-FE-2B-E1-E6-62-5A-75-35-5D-FF-29-DA-67-73-7A-FF-AD-5F-ED-FD-4F-93-BF-4F-7F-9F-79-D6-3E-2F-D5-BD-AC-2E-AF-3F-E7-D3-3B-53-7F-A7-7F-2E-9F-E7-E9-5D-B5-F7-7F-26-7F-AD-C5-9F-62-3C-CD-9F-8F-67-75-7F-8F-1B-50-42-DC-B4-4D-E4-D2-3E-0A-37-3C-62-F8-64-0E-44-99-42-A4-AA-8D-8B-27-B0-B2-2F-23-D6-DC-70-E1-23-59-9B-B6-D5-62-9F-7D-6F-25-30-7F-04-4B-8A-25-98-AC-CD-D3-2B-DB-A4-45-3D-D1-6A-35-39-91-99-C0-60-6A-63-83-76-C5-84-7F-03-E4-F5-CC-FC-D9-08-67-4D-CB-27-EA-0E-78-AE-81-5F-D9-68-E6-1A-06-CE-72-90-25-87-C7-5A-3B-07-1A-9A-20-64-9D-EC-B6-53-30-CB-5D-DB-CF-D7-60-52-A6-2C-3A-C7-6A-A9-CC-4E-6C-D4-87-1C-8D-C5-E6-D1-D9-CF-87-2E-F0-33-6A-C1-A3-4E-A9-9B-B0-36-57-DF-A1-CE-59-76-BE-13-A7-15-6C-3E-D9-07-34-C9-E9-30-EF-F8-72-16-4C-5E-EB-70-33-C6-06-2B-8E-52-7E-E8-40-5A-B1-45-6F-1B-4C-5C-BA-99-DD-52-2B-5C-18-CC-9F-29-B7-11-B6-A9-EC-E8-30-54-01-BB-BC-BB-66-DD-C8-C5-CB-4B-D8-D0-7E-EC-FA-E6-B7-D7-42-A0-7B-F6-3A-D1-D5-B4-09-5A-99-FA-D9-7B-8B-7F-C2-C3-0A-D3-FB-50-89-74-50-19-0E-AE-69-20-1A-D1-0E-D6-67-EA-09-69-1A-95-3A-0D-E5-89-E9-95-38-05-B7-0E-7E-1B-AF-20-2A-7E-64-7B-96-FA-9B-33-7A-1A-A4-9D-E4-09-5B-3E-8C-45-F0-63-07-F1-99-2C-B6-DE-AC-35-1F-93-D4-CF-03-8B-67-42-4F-32-83-59-79-78-EC-70-1D-DE-2B-6A-B1-32-50-37-CF-EB-7E-9A-2B-A8-EF-A7-CA-72-8F-48-AC-A2-C0-3F-7D-6C-9A-0B-D6-E5-C2-AE-53-63-F3-2A-ED-CB-89-75-7C-E8-AC-C0-1F-64-F8-92-45-B8-06-0E-FB-B6-D5-66-7D-D7-07-62-7E-A0-E1-76-29-A9-7C-60-EC-D5-E2-8E-E2-51-1E-EB-4B-FD-37-7A-9B-13-BD-D7-72-DE-A8-65-FB-A5-D3-00-37-27-E6-5F-BA-15-AC-84-6F-45-F6-C1-2F-76-38-6D-B7-2D-B9-99-E0-F5-13-BD-8A-6A-83-FE-1B-23-AD-B6-A0-2B-0C-62-5D-94-19-D4-1D-0C-4C-1C-58-45-2D-8B-55-A9-FC-89-B9-E2-49-A1-BB-C2-C2-8B-4C-5E-74-76-C0-0B-03-07-9B-2A-00-D6-1E-79-2A-AD-C0-8A-6C-00-19-4C-6C-CD-C2-CE-6A-24-5B-1A-BA-1C-6E-AF-C5-8E-0C-F7-40-0D-20-40-5D-0A-E1-D3-18-63-EF-10-8B-91-71-62-F2-76-99-B5-FB-42-0A-72-17-AD-97-AD-0F-CB-6A-0F-0A-86-EC-AC-E8-58-20-CA-51-E8-77-CA-6A-EA-92-F6-67-95-79-0C-80-7B-2F-FB-02-D7-28-CF-77-28-00-3B-1A-17-5F-FE-D5-9C-7F-F2-38-D9-6F-DD-6F-65-B3-F4-D6-A5-A3-96-72-A9-9D-E9-AB-3A-EB-8D-B3-5E-B6-2A-35-9D-41-6E-1D-8F-5F-ED-C6-04-98-1A-D3-6D-95-B0-D4-14-7B-76-D0-29-51-C6-8C-8C-7D-DB-96-21-98-37-E2-50-0B-71-15-8E-3A-5E-3C-16-B0-8A-7F-CB-7E-C6-D2-49-E7-DE-5E-72-F4-CC-07-58-E5-26-4D-AB-70-91-D6-88-D5-CB-D8-D4-D5-EE-DD-D7-AB-36-6F-C4-60-AD-C3-14-9D-0C-EE-5B-BB-03-09-B0-3B-0D-50-78-F1-C3-5E-E5-D6-29-39-1A-2C-98-87-C0-2A-D0-F7-82-73-E6-AF-C2-A5-FC-E6-C0-52-EF-8F-DF-46-93-BC-0A-8D-B4-EE-5A-72-4D-D6-75-9B-BB-2B-12-C7-69-05-C1-F0-04-60-C8-33-90-52-11-64-97-6D-0E-AB-33-88-C3-20-58-E3-E0-FE-CA-EF-55-BC-9E-10-93-45-AC-58-75-ED-30-D7-A8-B7-97-73-9E-19-3B-98-1A-45-A2-D2-3C-D0-32-CD-9C-9B-24-C6-E9-61-D4-84-09-FA-38-D0-CD-5E-3F-69-1F-F8-F9-94-5B-79-C0-86-B4-97-83-61-91-D1-7E-4F-7E-1E-DA-E5-C7-36-78-F6-69-D5-F5-78-40-8F-9E-59-AB-FA-0E-5D-7B-CC-B2-20-C1-2A-5C-14-6A-62-93-27-02-B3-C6-39-0D-B5-71-3E-AB-C1-24-FA-A4-9C-C8-FB-19-FF-E0-E8-6E-6E-50-FE-3A-DF-95-A1-2F-89-00-49-34-E6-B0-84-7C-0D-5D-E0-47-81-7A-15-73-36-7A-70-D8-E2-50-E9-A7-59-4E-8B-2E-80-79-0D-C0-BB-2B-D6-4A-9B-6E-15-54-AF-E2-0C-D6-6A-B8-91-7E-72-24-AA-5E-6C-7E-78-3B-37-74-1A-43-13-DF-67-8E-77-35-15-7B-67-70-F4-9A-CB-40-46-36-D1-35-67-D1-AA-67-AB-B4-03-59-2F-CD-9E-E7-8D-BF-E8-50-5E-74-2B-86-7F-9C-AD-21-D8-D0-89-13-D1-79-B1-2E-F4-03-15-FD-38-EF-82-74-85-8F-AD-65-BD-EE-34-10-EC-66-50-76-07-D2-8F-2E-C6-01-6E-66-63-4D-16-BB-A0-1B-5B-45-EB-E7-D0-98-8C-19-CA-9B-5C-16-0D-7E-8A-B6-5E-19-BE-9F-CF-D5-53-F5-59-40-C3-5A-AF-8C-24-AB-5C-D6-8D-41-AD-6C-FB-0A-BF-42-2F-84-60-F5-A3-4E-A6-A0-A7-F5-A4-CF-CE-A8-3B-C6-07-BA-63-68-B6-40-4F-1F-F8-99-50-58-6B-8C-49-59-8F-43-DD-E6-A2-85-9C-63-2E-23-28-2B-44-6C-BA-86-F4-94-C4-BE-FF-86-5E-19-47-10-A3-7B-E8-52-49-1D-0C-73-D8-86-21-97-F2-56-D9-F0-B5-4B-1C-47-78-3C-A3-09-84-7C-17-96-75-09-5D-B2-71-BC-04-C7-A8-E4-DC-5B-EB-0E-8F-6E-C5-3B-E2-50-9C-7C-E0-CB-45-E3-38-8B-90-72-14-86-D8-F1-3C-41-69-1C-73-00-61-C7-E0-D5-66-92-42-B9-CF-A5-0B-13-9E-38-32-86-25-42-E5-C6-81-3E-A4-D2-87-28-74-B5-8C-C8-AC-C4-0E-E4-3E-14-31-4F-94-44-9E-46-35-C2-5E-73-C3-1C-41-88-E3-A4-49-DC-23-9C-94-21-29-11-26-44-EF-65-16-C2-71-85-6E-07-71-6B-7F-10-44-62-BC-C7-F5-2D-59-48-80-B4-84-74-AC-99-24-DE-D1-91-BA-2D-79-2F-75-04-91-DD-D8-84-11-0C-3D-18-FB-BA-6D-93-51-24-44-4B-88-03-0A-A9-08-33-29-C1-09-C2-92-A1-10-3D-6C-DB-A7-38-6E-63-57-1E-5F-00-86-11-A2-76-19-33-4F-C4-0E-84-89-5C-C8-0E-CA-1E-DA-90-90-DB-A8-A5-E7-C7-90-4B-D4-3D-64-8D-C8-9A-A3-0D-86-8E-F7-E2-48-86-A1-8C-22-5D-5F-ED-2B-0E-08-15-54-F2-58-7B-AE-5B-F5-1A-12-F5-66-CE-D8-8F-B1-16-04-A3-2E-0C-51-87-4A-4C-6C-04-BD-64-0F-E1-95-8F-69-A4-44-F0-BA-46-36-85-1E-E5-79-47-93-4E-26-CA-46-A5-AA-20-25-14-63-88-7C-39-FE-5A-4D-C7-F6-C2-F1-F1-38-BB-69-7C-1C-B7-A0-7E-74-09-24-F6-00-39-A4-5C-52-7D-85-92-43-57-E9-FE-46-6F-8A-6F-22-E1-53-0A-B5-2E-4B-77-17-C1-9A-D5-25-92-9C-66-BE-CC-62-18-22-37-DC-5A-D0-43-E5-D8-21-C7-F3-39-44-7C-CC-BB-D3-0A-62-68-9F-3D-08-63-0A-B3-0C-86-40-37-E1-0D-D6-B8-A2-D4-F1-9D-D1-2E-50-26-47-1C-E1-2D-E6-77-24-FF-87-1C-D3-FF-47-8E-E9-2F-72-FC-22-C7-2F-72-FC-22-C7-2F-72-FC-22-C7-2F-72-FC-22-C7-BF-84-1C-FF-01-01-46-31-86-1D-11-00-00", + "response": "{\"fingerprints\": [{\"index\": \"0\", \"results\": [{\"id\": \"a9b004fe-e161-417c-9f9e-443e4525334d\", \"recordings\": [{\"id\": \"209a4536-97ac-4e8a-aff1-1d39d029044b\"}, {\"id\": \"30f3f33e-8d0c-4e69-8539-cbd701d18f28\"}], \"score\": 0.940997}, {\"id\": \"fe0a9bec-2633-4c37-89be-b5d295b68a00\", \"score\": 0.763876}, {\"id\": \"18eab869-51dc-4948-83f7-4d8d441d5a1b\", \"score\": 0.490447}]}, {\"index\": \"1\", \"results\": [{\"id\": \"a9b004fe-e161-417c-9f9e-443e4525334d\", \"recordings\": [{\"id\": \"209a4536-97ac-4e8a-aff1-1d39d029044b\"}, {\"id\": \"30f3f33e-8d0c-4e69-8539-cbd701d18f28\"}], \"score\": 0.940997}, {\"id\": \"fe0a9bec-2633-4c37-89be-b5d295b68a00\", \"score\": 0.763876}, {\"id\": \"18eab869-51dc-4948-83f7-4d8d441d5a1b\", \"score\": 0.490447}]}], \"status\": \"ok\"}" + }, + { + "requestContent": "1F-8B-08-00-00-00-00-00-00-03-4D-C9-31-0E-80-20-0C-00-C0-DF-30-1A-59-8C-4B-07-77-63-E2-13-90-16-2D-91-62-4A-FD-BF-8C-8E-97-8B-37-93-18-EC-CB-86-D3-9C-D9-AF-2E-55-2D-C1-20-B7-2A-AE-90-05-50-8A-55-91-E5-64-6C-EE-08-16-2F-F0-0E-5F-0D-C6-55-86-B1-23-F5-24-7D-94-C5-BA-7F-FA-00-CA-DF-73-C5-5E-00-00-00", + "response": "{\"error\": {\"code\": 3, \"message\": \"invalid fingerprint\"}, \"status\": \"error\"}" + } +] diff --git a/src/NzbDrone.Core.Test/ParserTests/FingerprintingServiceFixture.cs b/src/NzbDrone.Core.Test/ParserTests/FingerprintingServiceFixture.cs index 002f1016d..55d48fb83 100644 --- a/src/NzbDrone.Core.Test/ParserTests/FingerprintingServiceFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/FingerprintingServiceFixture.cs @@ -1,23 +1,55 @@ -using FluentAssertions; -using NUnit.Framework; -using NzbDrone.Core.Test.Framework; -using NzbDrone.Core.Parser; +using System; using System.Collections.Generic; using System.IO; using System.Linq; -using NzbDrone.Core.Parser.Model; -using System; -using NzbDrone.Common.Http; -using Moq; -using static NzbDrone.Core.Parser.FingerprintingService; -using NzbDrone.Test.Common; using System.Net; +using FluentAssertions; +using Moq; +using Newtonsoft.Json; +using NUnit.Framework; +using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Common.Http; +using NzbDrone.Core.Parser; +using NzbDrone.Core.Parser.Model; +using NzbDrone.Core.Test.Framework; +using NzbDrone.Test.Common; +using static NzbDrone.Core.Parser.FingerprintingService; namespace NzbDrone.Core.Test.ParserTests { [TestFixture] public class FingerprintingServiceFixture : CoreTest { + public class FingerPrintTest + { + public string RequestContent { get; set; } + public string Response { get; set; } + } + + [SetUp] + public void UseAcoustidResponses() + { + // responses were generated by editing HttpClient to write out the content bytes as a string + // using BitConverter.ToString(request.ContentData) + var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "Files", "Fingerprinting", "AcoustidResponses.json"); + var responses = JsonConvert.DeserializeObject>(File.ReadAllText(path)); + + foreach (var response in responses) + { + Mocker.GetMock() + .Setup(o => o.Post( + It.Is(v => + v.Url.Equals(new HttpUri("https://api.acoustid.org/v2/lookup")) && + v.Headers.Contains(new KeyValuePair("Content-Encoding", "gzip")) && + v.Headers.ContentType == "application/x-www-form-urlencoded" && + // Skip past the first bit of gzip header which varies by OS: + // http://www.onicos.com/staff/iz/formats/gzip.html + BitConverter.ToString(v.ContentData).Substring(31) == response.RequestContent.Substring(31) + ))) + .Returns(r => new HttpResponse(new HttpResponse(r, new HttpHeader(), response.Response))); + + } + } [Test] public void should_parse_fpcalc_json() @@ -72,8 +104,6 @@ FINGERPRINT=AQAHJlMURlEURcgP6cwRD43Y4Ptw9FowncWPWkf6GB9-JYdP9OgJHw8u4Apw4SsOHMdx [TestCase("nin.flac")] public void should_lookup_file(string file) { - UseRealHttp(); - var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "Files", "Media", file); var localTrack = new LocalTrack { Path = path }; Subject.Lookup(new List { localTrack }, 0.5); @@ -84,8 +114,6 @@ FINGERPRINT=AQAHJlMURlEURcgP6cwRD43Y4Ptw9FowncWPWkf6GB9-JYdP9OgJHw8u4Apw4SsOHMdx [Test] public void should_lookup_list() { - UseRealHttp(); - var files = new [] { "nin.mp3", "nin.flac" @@ -99,8 +127,6 @@ FINGERPRINT=AQAHJlMURlEURcgP6cwRD43Y4Ptw9FowncWPWkf6GB9-JYdP9OgJHw8u4Apw4SsOHMdx [Test] public void should_lookup_list_when_fpcalc_fails_for_some_files() { - UseRealHttp(); - var files = new [] { "nin.mp3", "missing.mp3", @@ -119,8 +145,6 @@ FINGERPRINT=AQAHJlMURlEURcgP6cwRD43Y4Ptw9FowncWPWkf6GB9-JYdP9OgJHw8u4Apw4SsOHMdx [Test] public void should_lookup_list_when_fpcalc_fails_for_all_files() { - UseRealHttp(); - var files = new [] { "missing1.mp3", "missing2.mp3" @@ -137,8 +161,6 @@ FINGERPRINT=AQAHJlMURlEURcgP6cwRD43Y4Ptw9FowncWPWkf6GB9-JYdP9OgJHw8u4Apw4SsOHMdx [Test] public void should_not_fail_if_duration_reported_as_zero() { - UseRealHttp(); - var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "Files", "Media", "missing.mp3"); var localTrack = new LocalTrack { Path = path }; var acoustId = new AcoustId { @@ -152,8 +174,6 @@ FINGERPRINT=AQAHJlMURlEURcgP6cwRD43Y4Ptw9FowncWPWkf6GB9-JYdP9OgJHw8u4Apw4SsOHMdx [Test] public void should_not_throw_if_fingerprint_invalid() { - UseRealHttp(); - var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "Files", "Media", "missing.mp3"); var localTrack = new LocalTrack { Path = path }; var acoustId = new AcoustId { @@ -169,8 +189,6 @@ FINGERPRINT=AQAHJlMURlEURcgP6cwRD43Y4Ptw9FowncWPWkf6GB9-JYdP9OgJHw8u4Apw4SsOHMdx [Test] public void should_not_fail_for_some_invalid_fingerprints() { - UseRealHttp(); - var files = new [] { "nin.mp3", "nin.flac"