Beispiel #1
0
 def testInvalidInput6(self):
     self.assertEqual(
         getGitHubInfo({
             'kristen': 'junior',
             'kevin': 'freshman'
         }), 'gitHubUserId must be a string',
         'Only a string may be passed to getGitHubInfo().')
Beispiel #2
0
 def testValidInput2(self):
     self.assertEqual(
         getGitHubInfo('richkempinski'),
         [['hellogitworld', 30], ['helloworld', 2], ['Project1', 2],
          ['threads-of-life', 1]],
         'richkempinski has the folllowing repos and commits: hellogitworld - 30, helloworld - 2, Project1 - 2, threads-of-life - 1.'
     )
Beispiel #3
0
 def testValidInput1(self):
     self.assertEqual(
         getGitHubInfo('bsb226'),
         [['GuessingGame', 3], ['GuessingGame2', 2], ['hello-world', 3],
          ['HelloJava', 4], ['ud851-Exercises', 30]],
         'bsb226 has the following repos and commits: GuessingGame - 3, GuessingGame2 - 2, hello-world - 3, HelloJava - 4, ud851-Exercises - 30.'
     )
Beispiel #4
0
 def testInvalidInput5(self):
     self.assertEqual(getGitHubInfo(
         (1, 2, 3, 4, 5)), 'gitHubUserId must be a string',
                      'Only a string may be passed to getGitHubInfo().')
Beispiel #5
0
 def testInvalidInput2(self):
     self.assertEqual(getGitHubInfo(False), 'gitHubUserId must be a string',
                      'Only a string may be passed to getGitHubInfo().')
Beispiel #6
0
 def testValidInput3(self):
     self.assertEqual(
         getGitHubInfo('Simoa33'), [['LaundryDetector', 2], ['uunite', 8]],
         'Simoa33 has the folllowing repos and commits: LaundryDetector - 2, uunite - 8.'
     )