def setUp(self): """ Set up a default Dogstatsd instance and mock the proc filesystem. """ # self.statsd = DogStatsd() self.statsd.socket = FakeSocket() # Mock the proc filesystem route_data = load_fixtures('route') self._procfs_mock = patch('datadog.util.compat.builtins.open', mock_open()) self._procfs_mock.__enter__().return_value.readlines.return_value = route_data.split("\n")