From d516d6fe286f65ecfcf199bb3b64f046c7a090b8 Mon Sep 17 00:00:00 2001
From: pcain <pcain@usgs.gov>
Date: Wed, 13 Oct 2021 16:58:51 -0600
Subject: [PATCH] Add client for misaligned mseed data

---
 ...iniSeedClient.py => mseed_test_clients.py} | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 rename test/edge_test/{MockMiniSeedClient.py => mseed_test_clients.py} (63%)

diff --git a/test/edge_test/MockMiniSeedClient.py b/test/edge_test/mseed_test_clients.py
similarity index 63%
rename from test/edge_test/MockMiniSeedClient.py
rename to test/edge_test/mseed_test_clients.py
index 88c6a4b61..9fd62bb79 100644
--- a/test/edge_test/MockMiniSeedClient.py
+++ b/test/edge_test/mseed_test_clients.py
@@ -37,3 +37,26 @@ class MockMiniSeedClient(Client):
         )
         trace.data = numpy.ones(trace.stats.npts)
         return Stream([trace])
+
+
+class MisalignedMiniSeedClient(MockMiniSeedClient):
+    """mock client that adds an offset value to endtime"""
+
+    def __init__(self, increment: int = 1):
+        self.increment = increment
+        self.offset = 0
+
+    def get_waveforms(
+        self,
+        network: str,
+        station: str,
+        location: str,
+        channel: str,
+        starttime: UTCDateTime,
+        endtime: UTCDateTime,
+    ):
+        endtime = endtime + self.offset
+        self.offset = self.offset + self.increment
+        return super().get_waveforms(
+            network, station, location, channel, starttime, endtime
+        )
-- 
GitLab