Example #1
0
 def delete(self, email):
     """
     Delete a consumer by email.
     """
     token = request.headers.get('Authorization')
     auth = Validations.validate_user_authorization(token)
     
     email_valid = Validations.email_validate(email)
     return CustomerManager.delete_customer(email)
 def test_if_email_is_valid(self):
     email = self.valid_user.get('email')
     Validations.email_validate(email)
Example #3
0
 def test_if_email_is_invalid(self):
     email = self.invalid_customer.get('email')
     validation = Validations.email_validate(email)
     self.assertFalse(validation)