from sqlmodel.default import Default


def test_default_bool() -> None:
    dt1 = Default(True)
    dt2 = Default(1)
    dt3 = Default("foo")
    dt4 = Default(["foo"])
    df1 = Default(False)
    df2 = Default(0)
    df3 = Default("")
    df4: list = Default([])
    df5 = Default(None)

    assert not not dt1
    assert not not dt2
    assert not not dt3
    assert not not dt4
    assert not df1
    assert not df2
    assert not df3
    assert not df4
    assert not df5


def test_equality() -> None:
    value1 = Default("foo")
    value2 = Default("foo")

    assert value1 == value2


def test_not_equality() -> None:
    value1 = Default("foo")
    value2 = Default("bar")

    assert not (value1 == value2)


def test_not_equality_other() -> None:
    value1 = Default("foo")
    value2 = "foo"

    assert not (value1 == value2)

sqlmodel.default.Default
[((82, 95), 'sqlmodel.default.Default', 'Default', (['(True)'], {}), '(True)\n', (89, 95), False, 'from sqlmodel.default import Default\n'), ((106, 116), 'sqlmodel.default.Default', 'Default', (['(1)'], {}), '(1)\n', (113, 116), False, 'from sqlmodel.default import Default\n'), ((127, 141), 'sqlmodel.default.Default', 'Default', (['"""foo"""'], {}), "('foo')\n", (134, 141), False, 'from sqlmodel.default import Default\n'), ((152, 168), 'sqlmodel.default.Default', 'Default', (["['foo']"], {}), "(['foo'])\n", (159, 168), False, 'from sqlmodel.default import Default\n'), ((179, 193), 'sqlmodel.default.Default', 'Default', (['(False)'], {}), '(False)\n', (186, 193), False, 'from sqlmodel.default import Default\n'), ((204, 214), 'sqlmodel.default.Default', 'Default', (['(0)'], {}), '(0)\n', (211, 214), False, 'from sqlmodel.default import Default\n'), ((225, 236), 'sqlmodel.default.Default', 'Default', (['""""""'], {}), "('')\n", (232, 236), False, 'from sqlmodel.default import Default\n'), ((253, 264), 'sqlmodel.default.Default', 'Default', (['[]'], {}), '([])\n', (260, 264), False, 'from sqlmodel.default import Default\n'), ((275, 288), 'sqlmodel.default.Default', 'Default', (['None'], {}), '(None)\n', (282, 288), False, 'from sqlmodel.default import Default\n'), ((521, 535), 'sqlmodel.default.Default', 'Default', (['"""foo"""'], {}), "('foo')\n", (528, 535), False, 'from sqlmodel.default import Default\n'), ((549, 563), 'sqlmodel.default.Default', 'Default', (['"""foo"""'], {}), "('foo')\n", (556, 563), False, 'from sqlmodel.default import Default\n'), ((641, 655), 'sqlmodel.default.Default', 'Default', (['"""foo"""'], {}), "('foo')\n", (648, 655), False, 'from sqlmodel.default import Default\n'), ((669, 683), 'sqlmodel.default.Default', 'Default', (['"""bar"""'], {}), "('bar')\n", (676, 683), False, 'from sqlmodel.default import Default\n'), ((773, 787), 'sqlmodel.default.Default', 'Default', (['"""foo"""'], {}), "('foo')\n", (780, 787), False, 'from sqlmodel.default import Default\n')]