コード例 #1
0
ファイル: test_hellosign.py プロジェクト: RideCell/hellosign
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
コード例 #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
コード例 #3
0
ファイル: test_hellosign.py プロジェクト: RideCell/hellosign
 def test_InValid(self):
     subject = HelloSigner(**{'email':'bob', 'name': 'Bob Examplar'})
     assert subject.validate() == False
コード例 #4
0
ファイル: test_hellosign.py プロジェクト: RideCell/hellosign
 def setUp(self):
     self.subject = HelloSigner(email='*****@*****.**', name='Bob Examplar')