-
-
Save tejastank/9800bba8c0cb39e29db669ba95d42437 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from validators import validate_email | |
class ValidatorsTestCase(unittest.TestCase): | |
def test_validate_email(self): | |
# Bu format kesinlikle doğru. | |
self.assertTrue(validate_email('[email protected]')) | |
# Alt tire, tire ya da rakam içerebilir. | |
self.assertTrue(validate_email('[email protected]')) | |
# Soru işareti ya da ünlem içeremez. | |
self.assertFalse(validate_email('[email protected]')) | |
# Mutlaka @ işareti içermelidir. | |
self.assertFalse(validate_email('birisigmail.com')) | |
# @ işareti adresin başında olamaz. | |
self.assertFalse(validate_email('@birisigmail.com')) | |
# @ işaretinden bir adet nokta içermelidir. | |
self.assertFalse(validate_email('birisii@gmailcom')) | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment