Esempio n. 1
0
    def test_admin_basic_auth(self):
        """Verify basic auth fails with admin account"""
        acc = common.get_admin_gpserviceaccount()
        client = GPClient(acc, auth=GPClient.BASIC_AUTH)
        ids = client.get_bundles()

        self.assertEqual(0, len(ids),
                         "Admin account can not use basic authentication")
Esempio n. 2
0
    def test_reader_get_bundles(self):
        """Verify bundles can not be obtained with reader acc"""
        acc = common.get_gpserviceaccount()
        client = GPClient(acc)

        expectedBundles = []
        actualBundles = client.get_bundles()

        common.my_assert_equal(self, expectedBundles, actualBundles,
                               'reader acc can not get bundles list')