Skip to content

Commit 500cf9c

Browse files
committed
Write tests first.
1 parent 341bd9c commit 500cf9c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ def test_skip_level(self):
112112
self.assertEqual(len(items), 1)
113113
self.assertEqual(items[0].name, "Jane Doe")
114114

115+
116+
class URITest(unittest.TestCase):
117+
118+
def test_get_domain(self):
119+
https_start = "https://github.com/edsu/microdata"
120+
self.assertEqual("github.com", URI.get_domain(https_start))
121+
122+
no_https = "github.com/edsu/microdata"
123+
self.assertEqual("github.com", URI.get_domain(no_https))
124+
125+
plain = "github.com"
126+
self.assertEqual(plain, URI.get_domain(plain))
115127

116128

117129
if __name__ == "__main__":

0 commit comments

Comments
 (0)