Example #1
0
 def testWhenAllDatasetsFetchedNotificationIsDisplayed(self):
   with self.mockOutput('',
                        'C57_AB dataset already present\nFVB dataset already present\ndemo dataset already present\nAll datasets already present.\n'):
     getTutorialData()
Example #2
0
 def testWhenAllDatasetsFetchedMissingDatasetIsSavedInTheCurrentDirectory(self):
   getTutorialData()
   self.checkExist('demo.zip', 'COPYING', 'LICENSE')
Example #3
0
 def setUp(self):
   super(GivenAllDatasetsPresent, self).setUp()
   getTutorialData()
Example #4
0
 def testWhenTheDatasetFetchedWithQuietFlagNoNotificationDisplayed(self):
   with self.mockOutput('', ''):
     getTutorialData(fetch='C57_AB', quiet=True)
Example #5
0
 def setUp(self):
   super(GivenC57_ABDatasetPresent, self).setUp()
   getTutorialData(fetch='C57_AB')
Example #6
0
 def testWhenUnknownDatasetRequestedNotificationIsDisplayed(self):
   with self.mockOutput('',
                        'Warning: unknown download requested (unknownDataset)\nAll datasets already present.\n'):
     getTutorialData(fetch='unknownDataset')
Example #7
0
 def testWhenDatasetFetchedNoNotificationIsDisplayed(self):
   for name in self.DATASETS:
     with self.mockOutput('', ''):
       getTutorialData(fetch=name)
Example #8
0
 def testWhenDatasetFetchedItIsSavedInTheCurrentDirectory(self):
   for name, files in self.DATASETS.items():
     getTutorialData(fetch=name)
     self.checkExist(*files)