Ejemplo n.º 1
0
 def test_get_doi(self):
     sampler = IdSampler()
     dois_list = sampler.get_dois()
     try:
         assert re.match(self.doi_regex, dois_list[0]), dois_list
     except IndexError:
         print "random doi is down"
Ejemplo n.º 2
0
 def test_get_doi(self):
     sampler = IdSampler()
     dois_list = sampler.get_dois()
     try:
         assert re.match(self.doi_regex, dois_list[0]), dois_list
     except IndexError:
         print "random doi is down"
Ejemplo n.º 3
0
 def test_get_multiple_dois(self):
     sampler = IdSampler()
     dois_list = sampler.get_dois(10)
     try:
         dois_list[0]  # test to see if random doi service down first
         assert_equals(len(dois_list), 10)
         assert re.match(self.doi_regex, dois_list[7]), dois_list
     except IndexError:
         print "random doi is down"
Ejemplo n.º 4
0
 def test_get_multiple_dois(self):
     sampler = IdSampler()
     dois_list = sampler.get_dois(10)
     try:
         dois_list[0]  # test to see if random doi service down first
         assert_equals(len(dois_list), 10)
         assert re.match(self.doi_regex, dois_list[7]), dois_list
     except IndexError:
         print "random doi is down"
Ejemplo n.º 5
0
 def test_get_github_username(self):
     sampler = IdSampler()
     username = sampler.get_github_username()
     assert isinstance(username, basestring)
     assert len(username) > 0, username
Ejemplo n.º 6
0
 def test_get_github_username(self):
     sampler = IdSampler()
     username = sampler.get_github_username()
     assert isinstance(username, basestring)
     assert len(username) > 0, username