(self)
Assert no duplicate service checks have been submitted.

        Service checks are considered duplicate when all following fields match:
            - metric name
            - status
            - tags
            - hostname
Assert no duplicate service checks have been submitted.
Assert no duplicate service checks have been submitted .
def assert_no_duplicate_service_checks(self):
        """
        Assert no duplicate service checks have been submitted.

        Service checks are considered duplicate when all following fields match:
            - metric name
            - status
            - tags
            - hostname
        """
        service_check_stubs = [m for metrics in self._service_checks.values() for m in metrics]

        def stub_to_key_fn(stub):
            return stub.name, stub.status, str(sorted(stub.tags)), stub.hostname

        self._assert_no_duplicate_stub('service_check', service_check_stubs, stub_to_key_fn)
def assert_no_duplicate_service_checks ( self ) : service_check_stubs = [ m for metrics in self . _service_checks . values ( ) for m in metrics ] def stub_to_key_fn ( stub ) : return stub . name , stub . status , str ( sorted ( stub . tags ) ) , stub . hostname self . _assert_no_duplicate_stub ( 'service_check' , service_check_stubs , stub_to_key_fn )