示例#1
0
 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')
示例#2
0
 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')
示例#3
0
 def handle(self, *args, **options):
     soundcloud = SoundCloudAPI()
     soundcloud.update_soundcloud()
     soundcloud.create_conversations()