-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created yandex-hosted provider for yandex mail for domains
- Loading branch information
Bibhas
committed
Jun 14, 2018
1 parent
4cb8eb8
commit f400580
Showing
5 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ | |
docs/_build | ||
build/ | ||
dist/ | ||
.pytest_cache | ||
__pycache__ |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
coverage run `which nosetests` | ||
coverage run -m pytest "$@" | ||
coverage report -m |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import unittest | ||
from mxsniff import mxsniff | ||
|
||
|
||
class MXSniffTestCase(unittest.TestCase): | ||
def test_mxsniff(self): | ||
result = mxsniff('google.com') | ||
self.assertFalse(result['public']) | ||
self.assertIn('google-apps', result['match']) | ||
self.assertGreater(len(result['mx']), 0) | ||
|
||
result = mxsniff('gmail.com') | ||
self.assertTrue(result['public']) | ||
self.assertIn('google-gmail', result['match']) | ||
self.assertEqual(len(result['mx']), 0) | ||
|
||
result = mxsniff('hasgeek.com') | ||
self.assertFalse(result['public']) | ||
self.assertIn('google-apps', result['match']) | ||
self.assertGreater(len(result['mx']), 0) | ||
|
||
result = mxsniff('yandex.ru') | ||
self.assertTrue(result['public']) | ||
self.assertIn('yandex', result['match']) | ||
self.assertEqual(len(result['mx']), 0) | ||
|
||
result = mxsniff('vayve.in') | ||
self.assertFalse(result['public']) | ||
self.assertIn('yandex-hosted', result['match']) | ||
self.assertGreater(len(result['mx']), 0) |