@@ -200,6 +200,17 @@ def test_directory_contents(self):
200200 assert content .name == filename
201201 assert isinstance (content , github3 .repos .contents .Contents )
202202
203+ def test_directory_contents_content (self ):
204+ """Tests the content/decoded attributes of a directory's file content"""
205+ cassette_name = self .cassette_name ('directory_contents' )
206+ with self .recorder .use_cassette (cassette_name ):
207+ repository = self .gh .repository ('sigmavirus24' , 'github3.py' )
208+ contents = repository .directory_contents ('github3/search/' )
209+
210+ for (filename , content ) in contents :
211+ assert content .content is None
212+ assert content .decoded is None
213+
203214 def test_events (self ):
204215 """Test that a user can iterate over the events from a repository."""
205216 cassette_name = self .cassette_name ('events' )
@@ -221,6 +232,16 @@ def test_file_contents(self):
221232
222233 assert isinstance (contents , github3 .repos .contents .Contents )
223234
235+ def test_file_contents_content (self ):
236+ """Tests that the content and decoded attributes of a file is set"""
237+ cassette_name = self .cassette_name ('file_contents' )
238+ with self .recorder .use_cassette (cassette_name ):
239+ repository = self .gh .repository ('sigmavirus24' , 'github3.py' )
240+ contents = repository .file_contents ('github3/repos/repo.py' )
241+
242+ assert contents .content is not None
243+ assert contents .decoded is not None
244+
224245 def test_forks (self ):
225246 """Test that a user can iterate over the forks of a repository."""
226247 cassette_name = self .cassette_name ('forks' )
0 commit comments