from testdoubleutil import SpyCall

from ._ClockStub import ClockStub


class ClockSpy(ClockStub):
    def __init__(self, now=None, utc_now=None):
        super().__init__(now, utc_now)
        self.now_call = SpyCall()
        self.utc_now_call = SpyCall()

    def now(self):
        self.now_call.register_call()
        return super().now_value()

    def utc_now(self):
        self.utc_now_call.register_call()
        return super().utc_now_value()
