'Runs after each test method to tear down test environment.'

def _common_cleanup(self):

    for x in self.injected:
        try:
            x.stop()
        except AssertionError:
            pass
    for x in self._services:
        try:
            x.kill()
        except Exception:
            pass
    for key in [k for k in self.__dict__.keys() if (k[0] != '_')]:
        del self.__dict__[key]
