Skip to content

Commit

Permalink
resolved unitetst error
Browse files Browse the repository at this point in the history
  • Loading branch information
karanpanchal-crest committed Apr 20, 2022
1 parent c4e8b19 commit 83f14e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/unittests/test_user_infinite_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from tap_zendesk.streams import Users
from tap_zendesk.streams import STREAMS
import singer

import datetime
from dateutil import tz

class MockSearch:
def __init__(self):
Expand All @@ -23,8 +24,8 @@ def search(self, test, updated_after, updated_before, type="user" ):
return self

class TestUserSyncCheck(unittest.TestCase):

def test_many_records_in_one_seconds_for_user(self):
@mock.patch('tap_zendesk.singer.utils.now', side_effect=lambda : datetime.datetime(2022, 4, 7, 1, 45, 21, 840535, tzinfo=tz.UTC))
def test_many_records_in_one_seconds_for_user(self, mocked_now):
"""
Reproduce infinite looping behavior for Users stream when user have many record in single seconds
"""
Expand Down

0 comments on commit 83f14e4

Please sign in to comment.