Exemple #1
0
 def test_validate(self):
     issuer = SetupPersonPortfolio().perform(PersonData(**Generate.person_data()[0]))
     foreign_issuer = issuer.to_portfolio()
     owner = SetupPersonPortfolio().perform(PersonData(**Generate.person_data()[0]))
     statement = CreateVerifiedStatement().perform(issuer, owner)
     with evaluate("Verified:Validate") as report:
         ValidateVerifiedStatement().validate(foreign_issuer, statement)
         self.assertNotIn(statement, foreign_issuer.verified_issuer)
     self.assertTrue(report)
Exemple #2
0
 def test_perform(self):
     issuer = SetupPersonPortfolio().perform(
         PersonData(**Generate.person_data()[0]))
     owner = SetupPersonPortfolio().perform(
         PersonData(**Generate.person_data()[0]))
     with evaluate("Verified:Create") as report:
         verified = CreateVerifiedStatement().perform(issuer, owner)
         self.assertIn(verified, issuer.verified_issuer)
     self.assertTrue(report)
 def test_validate(self):
     issuer = SetupPersonPortfolio().perform(
         PersonData(**Generate.person_data()[0]))
     foreign_issuer = issuer.to_portfolio()
     owner = SetupPersonPortfolio().perform(
         PersonData(**Generate.person_data()[0]))
     statement = CreateVerifiedStatement().perform(issuer, owner)
     revoked = CreateRevokedStatement().perform(issuer, statement)
     with evaluate("Revoked:Accept") as report:
         AcceptRevokedStatement().validate(foreign_issuer, revoked)
         self.assertIn(revoked, foreign_issuer.revoked_issuer)
     self.assertTrue(report)
Exemple #4
0
    def test_perform(self):
        issuer = SetupPersonPortfolio().perform(
            PersonData(**Generate.person_data()[0]))
        owner = SetupPersonPortfolio().perform(
            PersonData(**Generate.person_data()[0]))

        foreign_issuer = issuer.to_portfolio()
        verified = CreateVerifiedStatement().perform(issuer, owner)
        AcceptVerifiedStatement().validate(foreign_issuer, verified)
        self.assertIn(verified, foreign_issuer.verified_issuer)

        revoked = CreateRevokedStatement().perform(issuer, verified)
        AcceptRevokedStatement().validate(foreign_issuer, revoked)
        self.assertIn(revoked, foreign_issuer.revoked_issuer)

        with evaluate("Revoked:Remove") as report:
            RemoveRevokedStatement().perform(foreign_issuer, revoked)
            self.assertIn(revoked, foreign_issuer.revoked_issuer)
            self.assertNotIn(verified, foreign_issuer.verified_issuer)
        self.assertTrue(report)