File: test_converters.py

package info (click to toggle)
pastedeploy 3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 464 kB
  • sloc: python: 1,236; makefile: 106; sh: 17
file content (20 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def test_asbool_truthy():
    from paste.deploy.converters import asbool

    assert asbool('true')
    assert asbool('yes')
    assert asbool('on')
    assert asbool('y')
    assert asbool('t')
    assert asbool('1')


def test_asbool_falsy():
    from paste.deploy.converters import asbool

    assert not asbool('false')
    assert not asbool('no')
    assert not asbool('off')
    assert not asbool('n')
    assert not asbool('f')
    assert not asbool('0')