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
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
def test_InValid(self): subject = HelloSigner(**{'email':'bob', 'name': 'Bob Examplar'}) assert subject.validate() == False
def setUp(self): self.subject = HelloSigner(email='*****@*****.**', name='Bob Examplar')