mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
More tests
This commit is contained in:
parent
694fc2a8ca
commit
7d4643033d
2 changed files with 35 additions and 0 deletions
13
tests/test_gravatar.py
Normal file
13
tests/test_gravatar.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
import unittest
|
||||
from gitinspector import gravatar
|
||||
|
||||
TEST_STRING = 'arbitrary'
|
||||
|
||||
|
||||
class TestGravatar(unittest.TestCase):
|
||||
|
||||
def test_get_url(self):
|
||||
expected_url = 'https://www.gravatar.com/avatar/c181b12d45d1fd849f885221f3ee3f39?default=identicon'
|
||||
arbitrary_email = TEST_STRING + '@example.com'
|
||||
actual_url = gravatar.get_url(arbitrary_email)
|
||||
self.assertEqual(expected_url, actual_url)
|
22
tests/test_interval.py
Normal file
22
tests/test_interval.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
import unittest
|
||||
from gitinspector import interval
|
||||
|
||||
TEST_STRING = 'arbitrary'
|
||||
|
||||
|
||||
class TestInterval(unittest.TestCase):
|
||||
|
||||
def test_has_interval(self):
|
||||
actual = interval.has_interval()
|
||||
self.assertFalse(actual)
|
||||
|
||||
def test_get_since(self):
|
||||
expected = ''
|
||||
actual = interval.get_since()
|
||||
self.assertEqual(expected, actual)
|
||||
|
||||
def test_set_since(self):
|
||||
expected = '--since=' + TEST_STRING
|
||||
interval.set_since(TEST_STRING)
|
||||
actual = interval.get_since()
|
||||
self.assertEqual(expected, actual)
|
Loading…
Reference in a new issue