def test_ListAppsWithoutLogin(self, get): am = AppManager("target", self.dbn) capture = py.io.StdCaptureFD(in_=False) am.list() out, err = capture.reset() get.not_called() self.assertEquals(out.strip(), ELoginFirst)
def test_ListAppsWithLogin(self, get): t = self.cfgdb.get_default_target() eq_(t['name'], 'local') eq_(t['url'], 'http://127.0.0.1:8080') self.loggedin() am = AppManager("target", self.dbn) am.list() get.assert_called_with("target/apps", headers=TestAuthHeader)