@mock.patch('transcoder.tasks.transcode', mock.Mock())
@mock.patch('post_office.mailgun.requests', mock.Mock())
def test_fulfilling_a_shoutout_request_create_a_agency_profit_when_talent_is_managed(self, mock1):
    self.talent.agency = self.agency
    self.talent.save()
    response = self.client.post(reverse('request_shoutout:fulfill'), self.request_data, format='multipart')
    self.assertEqual(response.status_code, status.HTTP_201_CREATED)
    self.assertEqual(AgencyProfit.objects.count(), 1)
    agency_profit_qs = AgencyProfit.objects.filter(agency=self.agency, order=self.order, shoutout_price=1000, profit_percentage=Decimal('0.05'), profit=Decimal('50.00'), paid=False)
    self.assertTrue(agency_profit_qs.exists())
@mock.patch('transcoder.tasks.transcode', mock.Mock())
@mock.patch('post_office.mailgun.requests', mock.Mock())
def test_fulfilling_a_shoutout_request_create_a_agency_profit_when_talent_is_managed(self, mock1):
    self.talent.agency = self.agency
    self.talent.save()
    response = self.client.post(reverse('request_shoutout:fulfill'), self.request_data, format='multipart')
    self.assertEqual(response.status_code, status.HTTP_201_CREATED)
    self.assertEqual(AgencyProfit.objects.count(), 1)
    agency_profit_qs = AgencyProfit.objects.filter(agency=self.agency, order=self.order, shoutout_price=1000, profit_percentage=Decimal('0.05'), profit=Decimal('50.00'), paid=False)
    self.assertTrue(agency_profit_qs.exists())