Ejemplo n.º 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()
Ejemplo n.º 2
0
 def testWhenAllDatasetsFetchedMissingDatasetIsSavedInTheCurrentDirectory(self):
   getTutorialData()
   self.checkExist('demo.zip', 'COPYING', 'LICENSE')
Ejemplo n.º 3
0
 def setUp(self):
   super(GivenAllDatasetsPresent, self).setUp()
   getTutorialData()
Ejemplo n.º 4
0
 def testWhenTheDatasetFetchedWithQuietFlagNoNotificationDisplayed(self):
   with self.mockOutput('', ''):
     getTutorialData(fetch='C57_AB', quiet=True)
Ejemplo n.º 5
0
 def setUp(self):
   super(GivenC57_ABDatasetPresent, self).setUp()
   getTutorialData(fetch='C57_AB')
Ejemplo n.º 6
0
 def testWhenUnknownDatasetRequestedNotificationIsDisplayed(self):
   with self.mockOutput('',
                        'Warning: unknown download requested (unknownDataset)\nAll datasets already present.\n'):
     getTutorialData(fetch='unknownDataset')
Ejemplo n.º 7
0
 def testWhenDatasetFetchedNoNotificationIsDisplayed(self):
   for name in self.DATASETS:
     with self.mockOutput('', ''):
       getTutorialData(fetch=name)
Ejemplo n.º 8
0
 def testWhenDatasetFetchedItIsSavedInTheCurrentDirectory(self):
   for name, files in self.DATASETS.items():
     getTutorialData(fetch=name)
     self.checkExist(*files)