Example #1
0
class TestHelloSigner(mocktest.TestCase):
    def setUp(self):
        self.subject = HelloSigner(email='*****@*****.**', name='Bob Examplar')

    def test_IsValid(self):
        assert self.subject.validate() == True

    def test_InValid(self):
        subject = HelloSigner(**{'email':'bob', 'name': 'Bob Examplar'})
        assert subject.validate() == False
Example #2
0
    def send_for_signing(self, **kwargs):
        signature = self.HelloSignSignatureClass(title=self.title,
                                                 subject=self.subject,
                                                 message=self.message)

        # Add invitees
        for i in self.invitees:
            signature.add_signer(HelloSigner(name=i['name'], email=i['email']))

        signature.add_doc(HelloDoc(file_path=self.document.name))

        # Perform the submission
        result = signature.create(auth=self.hellosign_authentication, **kwargs)

        return result
Example #3
0
 def test_InValid(self):
     subject = HelloSigner(**{'email':'bob', 'name': 'Bob Examplar'})
     assert subject.validate() == False
Example #4
0
 def setUp(self):
     self.subject = HelloSigner(email='*****@*****.**', name='Bob Examplar')