Beispiel #1
0
    def test_has_relationship_many(self):
        self.financial_adviser.clients.add(self.active_client)

        relationship = Relationship(self.active_client,
                                    self.financial_adviser,
                                    related_name='clients')

        self.assertTrue(relationship.has_relationship())
Beispiel #2
0
    def test_has_relationship_not_many(self):
        self.active_client.financial_planning = self.financial_planning

        relationship = Relationship(self.active_client,
                                    self.financial_planning,
                                    related_name='financial_planning')

        self.assertTrue(relationship.has_relationship())
Beispiel #3
0
 def test_hasnt_relationship_many(self):
     relationship = Relationship(self.active_client,
                                 self.financial_adviser,
                                 related_name='clients')
     self.assertFalse(relationship.has_relationship())