File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -16,21 +16,25 @@ class TestThread(UnitHelper):
16
16
example_data = get_notification_example_data ()
17
17
18
18
def test_equality (self ):
19
+ """Test equality/inequality between two instances"""
19
20
thread = github3 .notifications .Thread (get_notification_example_data ())
20
21
assert self .instance == thread
21
22
thread ._uniq = 1
22
23
assert self .instance != thread
23
24
24
25
def test_is_unread (self ):
26
+ """Show that is_unread() equals unread property"""
25
27
assert self .instance .is_unread () == self .instance .unread
26
28
27
29
def test_last_read_at (self ):
30
+ """Show that last_read_at attribute is a datetime type"""
28
31
json = self .instance .as_dict ().copy ()
29
32
json ['last_read_at' ] = '2013-12-31T23:59:59Z'
30
33
thread = github3 .notifications .Thread (json )
31
34
assert isinstance (thread .last_read_at , datetime .datetime )
32
35
33
36
def test_repr (self ):
37
+ """Show instance string is formatted correctly"""
34
38
assert repr (self .instance ) == '<Thread [{0}]>' .format (
35
39
self .instance .subject .get ('title' ))
36
40
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ class TestSubscription(UnitHelper):
13
13
example_data = get_subscription_example_data ()
14
14
15
15
def test_repr (self ):
16
+ """Show that instance is formatted as a string when printed"""
16
17
assert isinstance (repr (self .instance ), str )
17
18
18
19
def test_delete (self ):
You can’t perform that action at this time.
0 commit comments