def test_create_sequential_date_column(self): with open('tests/resources/columns/sequential_date_column.json' ) as f: # noqa ES501 c = create_column(json.load(f)) self.assertIsInstance( c, SequentialDateColumn, 'Create the correct sequential date column') # noqa ES501
def __init__(self, json, get_value=None): self.name = json['name'] self.rows = json['rows'] self.columns = [ create_column(c, self.get_value) for c in json['columns'] ] self._get_value = get_value
def test_create_random_date_column(self): with open('tests/resources/columns/random_date_column.json' ) as f: # noqa ES501 c = create_column(json.load(f)) self.assertIsInstance( c, RandomDateColumn, 'Create the correct random date column') # noqa ES501
def test_create_value_expression_column(self): with open('tests/resources/columns/value_expression_column.json' ) as f: # noqa ES501 c = create_column(json.load(f)) self.assertIsInstance( c, ValueExpressionColumn, 'Create the correct value expression column') # noqa ES501
def test_create_date_multi_column(self): with open('tests/resources/columns/date_multi_column.json') as f: c = create_column(json.load(f)) self.assertIsInstance(c, DateMultiColumn, 'Create the date multi column') # noqa ES501
def test_create_person_name_column(self): with open('tests/resources/columns/person_name_column.json') as f: c = create_column(json.load(f)) self.assertIsInstance( c, PersonNameColumn, 'Create the correct person name column') # noqa ES501
def test_create_key_column(self): with open('tests/resources/columns/key_column.json') as f: c = create_column(json.load(f)) self.assertIsInstance(c, KeyColumn, 'Create the correct key column')