예제 #1
0
    def test_dataset_api_create_with_legacy_frequency(self):
        '''It should create a dataset from the API with a legacy frequency'''
        self.login()

        for oldFreq, newFreq in LEGACY_FREQUENCIES.items():
            data = DatasetFactory.as_dict()
            data['frequency'] = oldFreq
            response = self.post(url_for('api.datasets'), data)
            self.assert201(response)
            self.assertEqual(response.json['frequency'], newFreq)
예제 #2
0
 def test_legacy_frequencies(self):
     for oldFreq, newFreq in LEGACY_FREQUENCIES.items():
         dataset = DatasetFactory(frequency=oldFreq)
         self.assertEqual(dataset.frequency, newFreq)
예제 #3
0
 def test_legacy_frequencies(self):
     for oldFreq, newFreq in LEGACY_FREQUENCIES.items():
         dataset = DatasetFactory(frequency=oldFreq)
         assert dataset.frequency == newFreq