'Test create list in sailthru'

@patch('email_marketing.tasks.SailthruClient')
def test_create_sailthru_list(self, mock_sailthru_client):

    mock_sailthru_client.api_post.return_value = SailthruResponse(JsonResponse({'ok': True}))
    self.assertEqual(_create_user_list(mock_sailthru_client, 'test_list_name'), True)
    self.assertEquals(mock_sailthru_client.api_post.call_args[0][0], 'list')
    listparms = mock_sailthru_client.api_post.call_args[0][1]
    self.assertEqual(listparms['list'], 'test_list_name')
    self.assertEqual(listparms['primary'], 0)
    self.assertEqual(listparms['public_name'], 'test_list_name')
