Commits

Vic Bukhantsov committed ce3483e

rename sounds method to get_sounds; add get_sounds method into AbstractClient; update tests and docs

Comments (0)

Files changed (3)

pushnotify/abstract.py

         """
 
         raise NotImplementedError
+
+    def get_sounds(self):
+        """ Retrieve available sounds list.
+
+        Returns:
+            A dictionary with each key being the actual sound parameter to store for the user
+            and send back with notify request, with its value describing the sound.
+        """
+        raise NotImplementedError

pushnotify/pushover.py

 
         return self._last['status']
 
-    def sounds(self):
+    def get_sounds(self):
         """ Retrieve available sounds list.
 
         Returns:
-            A hash with each key being the actual sound parameter to store for the user
+            A dictionary with each key being the actual sound parameter to store for the user
             and send to Pushover, with its value describing the sound.
         """
         response = self._get(self._urls['sounds'],

pushnotify/tests/tests.py

         self.assertRaises(exceptions.ApiKeyError, self.client.verify_device,
                           'foo', device_key)
 
-    def test_sound(self):
+    def test_get_sounds(self):
         """ Test retrieve sounds list from pushover
         """
-        sounds = self.client.sounds()
+        sounds = self.client.get_sounds()
         self.assertGreater(len(sounds.keys()), 0)
 
 if __name__ == '__main__':