mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-08 16:43:47 +01:00
Fix UI tests
This commit is contained in:
parent
347f8e5a22
commit
24e3b1505b
@ -9,8 +9,9 @@ def test_login_logout(client):
|
|||||||
rv = client.get("/")
|
rv = client.get("/")
|
||||||
assert not is_logged_in(rv)
|
assert not is_logged_in(rv)
|
||||||
|
|
||||||
|
assert b"Sign out" not in rv.data
|
||||||
rv = login(client, "rubenwardy", "tuckfrump")
|
rv = login(client, "rubenwardy", "tuckfrump")
|
||||||
assert b"Logged in successfully." in rv.data
|
assert b"Sign out" in rv.data
|
||||||
assert is_logged_in(rv)
|
assert is_logged_in(rv)
|
||||||
|
|
||||||
rv = client.get("/")
|
rv = client.get("/")
|
||||||
@ -81,6 +82,7 @@ def test_register_flow(client):
|
|||||||
rv = client.get(url_for('users.verify_email', token=email.token), follow_redirects=True)
|
rv = client.get(url_for('users.verify_email', token=email.token), follow_redirects=True)
|
||||||
assert b"You may now log in" in rv.data
|
assert b"You may now log in" in rv.data
|
||||||
|
|
||||||
|
assert b"Sign out" not in rv.data
|
||||||
rv = login(client, username, "password")
|
rv = login(client, username, "password")
|
||||||
assert b"Logged in successfully." in rv.data
|
assert b"Sign out" in rv.data
|
||||||
assert is_logged_in(rv)
|
assert is_logged_in(rv)
|
||||||
|
35
migrations/versions/51be0401bb85_.py
Normal file
35
migrations/versions/51be0401bb85_.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: 51be0401bb85
|
||||||
|
Revises: d4262fb15b37
|
||||||
|
Create Date: 2021-07-24 00:25:04.706191
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
from sqlalchemy.dialects import postgresql
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '51be0401bb85'
|
||||||
|
down_revision = 'd4262fb15b37'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.create_table('package_alias',
|
||||||
|
sa.Column('id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('package_id', sa.Integer(), nullable=False),
|
||||||
|
sa.Column('author', sa.String(length=50), nullable=False),
|
||||||
|
sa.Column('name', sa.String(length=100), nullable=False),
|
||||||
|
sa.ForeignKeyConstraint(['package_id'], ['package.id'], ),
|
||||||
|
sa.PrimaryKeyConstraint('id')
|
||||||
|
)
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_table('package_alias')
|
||||||
|
# ### end Alembic commands ###
|
Loading…
Reference in New Issue
Block a user