def test_that_incorrect_sample_shape_reverts_to_previous_sampleshape(self): try: table_index_model = TableIndexModel('0', "", "", "", "", "", "", "", "", "", "", "", "", "", "", sample_shape="Disc") table_index_model.sample_shape = "not a sample shape" except Exception as e: self.assertTrue(False, "Did not except incorrect sample shape to raise error") else: self.assertEqual("Disc", table_index_model.sample_shape_string)
def test_that_empty_string_is_acceptable_sample_shape(self): table_index_model = TableIndexModel('0', "", "", "", "", "", "", "", "", "", "", "", "", "", "", sample_shape="Disc") table_index_model.sample_shape = "" sample_shape_enum = table_index_model.sample_shape sample_shape_text = table_index_model.sample_shape_string self.assertEqual(sample_shape_enum, "") self.assertEqual(sample_shape_text, "")