From Yaniv Bronhaim <ybron...@redhat.com>: Yaniv Bronhaim has posted comments on this change.
Change subject: Adding simple client for sending gauge metrics to statsd port using udp ...................................................................... Patch Set 15: Verified+1 (1 comment) https://gerrit.ovirt.org/#/c/67004/15/tests/statsd_tests.py File tests/statsd_tests.py: Line 24: Line 25: Line 26: class StatsdModuleTest(TestCaseBase): Line 27: @classmethod Line 28: def setup_class(self): > Why are you reinventing monkeypatch.MonkeyPatch? the test code looks good enough, no? monkeypatch doesn't fit here to the way I use the Mock(). I should do something like @MonkeyPatch(statsd.socket, 'sendto', self.mock_socket.sendto) but then I need mock_socket to be in module level. Line 29: self.old_socket = statsd.socket.socket Line 30: self.mock_socket = statsd.socket.socket = mock.Mock() Line 31: try: Line 32: statsd.start('localhost') -- To view, visit https://gerrit.ovirt.org/67004 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7bbc8a4c0e3afc25c205bfec58c5e77096803404 Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Irit Goihman <igoih...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org