@@ -818,7 +818,6 @@ def check_citedby_1k(self, pub):
818818 self .assertEqual (len (citation_list ), original_citation_count )
819819 return citation_list
820820
821- @unittest .skipIf (os .getenv ("CONNECTION_METHOD" ) in {None , "none" , "freeproxy" }, reason = "No robust proxy setup" )
822821 def test_citedby_1k_citations (self ):
823822 """Test that scholarly can fetch 1000+ citations from an author
824823 """
@@ -832,7 +831,6 @@ def test_citedby_1k_citations(self):
832831 for year , count in pub ["cites_per_year" ].items ():
833832 self .assertEqual (yearwise_counter .get (str (year ), 0 ), count )
834833
835- @unittest .skipIf (os .getenv ("CONNECTION_METHOD" ) in {None , "none" , "freeproxy" }, reason = "No robust proxy setup" )
836834 def test_citedby_1k_scholar (self ):
837835 """Test that scholarly can fetch 1000+ citations from a pub search.
838836 """
@@ -841,6 +839,17 @@ def test_citedby_1k_scholar(self):
841839 pub = next (pubs )
842840 self .check_citedby_1k (pub )
843841
842+ def test_citedby (self ):
843+ """Test that we can search citations of a paper from author's profile.
844+ """
845+ # Retrieve the author's data, fill-in, and print
846+ search_query = scholarly .search_author ('Steven A Cholewiak' )
847+ author = scholarly .fill (next (search_query ))
848+ pub = scholarly .fill (author ['publications' ][0 ])
849+
850+ # Which papers cited that publication?
851+ top10_citations = [citation for num , citation in enumerate (scholarly .citedby (pub )) if num < 10 ]
852+ self .assertEqual (len (top10_citations ), 10 )
844853
845854if __name__ == '__main__' :
846855 unittest .main ()
0 commit comments