Esempio n. 1
0
    def test_fill_attributes_substituting(self):
        relationship = Relationship(self.active_client,
                                    self.financial_planning)

        primary = self.patrimony
        # pylint: disable=protected-access
        relationship._fill_attributes(primary=primary)
        self.assertEqual(relationship.primary, primary)
Esempio n. 2
0
    def test_fill_attributes(self):
        relationship = Relationship(self.active_client,
                                    self.financial_planning)
        self.assertEqual(relationship.primary, self.active_client)
        self.assertEqual(relationship.secondary, self.financial_planning)
        self.assertIsNone(relationship.related_name)

        # pylint: disable=protected-access
        related_name = 'any'
        relationship._fill_attributes(related_name=related_name)
        self.assertEqual(relationship.primary, self.active_client)
        self.assertEqual(relationship.secondary, self.financial_planning)
        self.assertEqual(relationship.related_name, related_name)