def test_callingGetAvailableSchemesCallsFilterOnCompetenceFieldCollectionToCompanyRelationWithCompanyPkAsArgument( self): company = Company() company.pk = 8 with mock.patch.object(CompetenceFieldCollectionToCompanyRelation, 'objects') as query_mock: company.getAvailableSchemes() query_mock.filter.assert_called_with(company__pk=company.pk)
def test_callingGetAvailableSchemesCallsFilterOnCompetenceFieldCollectionToCompanyRelationWithCompanyPkAsArgument(self): company = Company() company.pk = 8 with mock.patch.object(CompetenceFieldCollectionToCompanyRelation, 'objects') as query_mock: company.getAvailableSchemes() query_mock.filter.assert_called_with(company__pk=company.pk)
def test_getAvailableSchemesWithoutAConnectionHasBeenMadeExpectEmptyListIsReturned(self): company = Company() schemes = company.getAvailableSchemes() self.assertEqual(0, len(schemes))
def test_getAvailableSchemesWithoutAConnectionHasBeenMadeExpectEmptyListIsReturned( self): company = Company() schemes = company.getAvailableSchemes() self.assertEqual(0, len(schemes))