def test_app_info_with_target(self):
        client = self.get_client()
        token = client.fetch_app_token('testapp')

        nt.assert_is_not_none(token)
        nt.assert_equal(self.appId, token.tokenPrincipal.principal)
        nt.assert_equal('testapp', token.validity.issuedFor)
        nt.assert_set_equal({'A', 'B', 'C'}, token.authorizations.formalAuthorizations)
        nt.assert_equal("low", token.authorizationLevel)
 def test_appcache_diff_target(self):
     client = self.get_client()
     t1 = client.fetch_app_token("Target")
     t2 = client.fetch_app_token("NotSecurityClientTest")
     nt.assert_not_equal(t1, t2)
 def test_appcache_expire(self):
     client = self.get_client()
     t1 = client.fetch_app_token("SecurityClientTest")
     time.sleep(0.6)
     t2 = client.fetch_app_token("SecurityClientTest")
     nt.assert_not_equal(t1, t2)
 def test_appcache_same_target(self):
     client = self.get_client()
     t1 = client.fetch_app_token("Target")
     t2 = client.fetch_app_token("Target")
     nt.assert_equal(t1, t2)