from airflow import models, settings
from airflow.contrib.auth.backends.password_auth import PasswordUser


def test_add_user():
    user = PasswordUser(models.User())
    user.username = 'admin'
    user.email = '<EMAIL>'
    user.password = '<PASSWORD>'
    user.superuser = 1
    session = settings.Session()
    session.add(user)
    session.commit()
    session.close()
from airflow import models, settings
from airflow.contrib.auth.backends.password_auth import PasswordUser


def test_add_user():
    user = PasswordUser(models.User())
    user.username = 'admin'
    user.email = '<EMAIL>'
    user.password = '<PASSWORD>'
    user.superuser = 1
    session = settings.Session()
    session.add(user)
    session.commit()
    session.close()