def test_gets_the_local_unit(self, os_): os_.environ = { 'JUJU_UNIT_NAME': 'foo', } self.assertEqual(hookenv.local_unit(), 'foo')