Label editing
This commit is contained in:
@@ -7,7 +7,7 @@ def test_database_migrations_are_versioned_and_idempotent():
|
||||
connection = sqlite3.connect(':memory:')
|
||||
|
||||
apply_migrations(connection)
|
||||
assert get_schema_version(connection) == 3
|
||||
assert get_schema_version(connection) == 4
|
||||
tables = {
|
||||
row[0]
|
||||
for row in connection.execute(
|
||||
@@ -17,11 +17,13 @@ def test_database_migrations_are_versioned_and_idempotent():
|
||||
assert {
|
||||
'users', 'tokens', 'links', 'plugins', 'user_plugin_config', 'tags', 'link_tags'
|
||||
} <= tables
|
||||
columns = {row[1] for row in connection.execute('PRAGMA table_info(tags)')}
|
||||
assert 'created_by' in columns
|
||||
seed_default_tags(connection)
|
||||
seeded_tags = {row[0] for row in connection.execute('SELECT name FROM tags')}
|
||||
assert set(DEFAULT_TAGS) <= seeded_tags
|
||||
|
||||
apply_migrations(connection)
|
||||
assert get_schema_version(connection) == 3
|
||||
assert get_schema_version(connection) == 4
|
||||
|
||||
connection.close()
|
||||
Reference in New Issue
Block a user