class KloutServiceTestCase(unittest.TestCase):
      def setUp(self):
        self.service = KloutService("key")
      def tearDown(self):
        self.service = None
      def test_makeCall_exists(self):
        self.assertTrue(callable(getattr(self.service, "makeCall")))
      def test_makeCall_raisesAnException(self):
        self.assertRaises(Exception, self.service.makeCall, *("url", "query"))
      def test_getCallUrl_exists(self):
        self.assertTrue(callable(getattr(self.service, "getCallUrl")))
      def test_getCallUrl_returnsTheScoreUrl(self):
        scoreUrl = "/1/klout.json"
        self.assertEquals(scoreUrl, self.service.getCallUrl("score"))
      def test_getCallUrl_returnsUserUrl(self):
        userUrl = "/1/users/show.json"
        self.assertEquals(userUrl, self.service.getCallUrl("user"))
      def test_getCallUrl_returnsTopicsUrl(self):
        topicUrl = "/1/users/topics.json"
        self.assertEquals(topicUrl, self.service.getCallUrl("topics"))
      def test_getCallUrl_returnsInfluencedByUrl(self):
        influencedByUrl = "/1/soi/influenced_by.json"
        self.assertEquals(influencedByUrl, self.service.getCallUrl("influencedBy"))
      def test_getCallUrl_returnsInfluencerOfUrl(self):
        influencerOfUrl = "/1/soi/influencer_of.json"
        self.assertEquals(influencerOfUrl, self.service.getCallUrl("influencerOf"))
      def test_getCallUrl_raisesAnException(self):
        self.assertRaises(Exception, self.service.getCallUrl, "NotExist")
      """
         _remove_empty_params method
      """
      def  test_remove_empty_params_exists(self):
        self.assertTrue(callable(getattr(self.service, "_remove_empty_params")))
      def  test_remove_empty_params_returnsADictionary(self):
        self.assertIsInstance(self.service._remove_empty_params({}), type({}))
      def test_remove_empty_params_raisesExceptionWithWrongInput(self):
        self.assertRaises(Exception, self.service._remove_empty_params, "wrong")
        self.assertRaises(Exception, self.service._remove_empty_params, 1)
        self.assertRaises(Exception, self.service._remove_empty_params, ["wrong"])
        self.assertRaises(Exception, self.service._remove_empty_params, ("wrong",))
      def test_remove_empty_params_removesTheEmptyParams(self):
        query = {"first":1, "second":2, "third":None}
        expectedQuery = {"first":1, "second":2}
        self.assertEquals(expectedQuery, self.service._remove_empty_params(query))
 def setUp(self):
   self.service = KloutService("key")