コード例 #1
0
def test_get_by_id_when_exists_returns_tech():
    t = tech.get_by_id('tech-siege-01')

    expect(t).to.be.a.tuple()
    expect(t.id).to.eq('tech-siege-01')
    expect(t.name).to.eq('None')
コード例 #2
0
def test_get_by_id_when_invalid_id_returns_None():
    t = tech.get_by_id(5)

    expect(t).to.be.none()
コード例 #3
0
def test_get_by_id_when_not_exists_returns_None():
    t = tech.get_by_id('tech-noexist')

    expect(t).to.be.none()
コード例 #4
0
def test_get_by_id_when_exists_returns_tech():
    t = tech.get_by_id('tech-siege-01')

    expect(t).to.be.a.tuple()
    expect(t.id).to.eq('tech-siege-01')
    expect(t.name).to.eq('None')
コード例 #5
0
def test_get_by_id_when_invalid_id_returns_None():
    t = tech.get_by_id(5)

    expect(t).to.be.none()
コード例 #6
0
def test_get_by_id_when_not_exists_returns_None():
    t = tech.get_by_id('tech-noexist')

    expect(t).to.be.none()