def test_new_conversation(self, mock_convos, mock_soundcloud): mock_convos.return_value = soundcloud_conversation_fixture soundcloud = SoundCloudAPI() soundcloud.create_conversations() conversations = Conversation.objects.all() self.assertEqual(len(conversations), 3) self.assertEqual(conversations[0].convo_id, '77871924:6924356') self.assertEqual(conversations[0].user_name, 'Bonbontaq') self.assertEqual(conversations[0].user_id, '6924356')
def handle(self, *args, **options): soundcloud = SoundCloudAPI() soundcloud.update_soundcloud() soundcloud.create_conversations()