def test_containsCookiesAfterCreateSession(self):
        client = AlmRestfulClient(self.username, self.password, self.domain, self.project)
        client.login()
        client.createSession()

        self.assertIn('X-XSRF-TOKEN', client._session.cookies.get_dict().keys())
        self.assertIn('QCSession', client._session.cookies.get_dict().keys())
 def test_getEntityWithIncorrectData(self):
     client = AlmRestfulClient(self.username, self.password, self.domain, self.project)
     client.login()
     client.createSession()
     with self.assertRaises(ValueError):
         client.getEntity('entity')
 def test_getEntityWithCorrectData(self):
     client = AlmRestfulClient(self.username, self.password, self.domain, self.project)
     client.login()
     client.createSession()
     self.assertIsInstance(client.getEntity('tests'), list)
 def test_createSessionWithoutLogin(self):
     client = AlmRestfulClient(self.username, self.password, self.domain, self.project)
     self.assertFalse(client.createSession())