def test_use_sevens(make_poem, add): make_poem.return_value = ['one', 'two', 'three'] poem = poems.use(7, 'foo') assert poem[1] == 'foo'
def test_use_sevens_tanka(make_poem, add): make_poem.return_value = ['one', 'two', 'three', 'four', 'five'] poem = poems.use(7, 'foo', poem_type='tanka') assert 'foo' in (poem[1], poem[3], poem[4])
def test_use_fives_tanka(make_poem, add): make_poem.return_value = ['one', 'two', 'three', 'four', 'five'] poem = poems.use(5, 'foo', poem_type='tanka') assert 'foo' in (poem[0], poem[2])
def test_use_fives_does_not_duplicate(make_poem, add): make_poem.return_value = ['foo', 'two', 'three'] poem = poems.use(5, 'foo') assert poem[0] == 'foo' assert poem[2] != 'foo'
def test_use_fives(make_poem, add): make_poem.return_value = ['one', 'two', 'three'] poem = poems.use(5, 'foo') assert 'foo' in (poem[0], poem[2])
def test_use_sevens(make_poem, add): make_poem.return_value = ["one", "two", "three"] poem = poems.use(7, "foo") assert poem[1] == "foo"
def test_use_fives_does_not_duplicate(make_poem, add): make_poem.return_value = ["foo", "two", "three"] poem = poems.use(5, "foo") assert poem[0] == "foo" assert poem[2] != "foo"
def test_use_fives_tanka(make_poem, add): make_poem.return_value = ["one", "two", "three", "four", "five"] poem = poems.use(5, "foo", poem_type="tanka") assert "foo" in (poem[0], poem[2])
def test_use_fives(make_poem, add): make_poem.return_value = ["one", "two", "three"] poem = poems.use(5, "foo") assert "foo" in (poem[0], poem[2])
def test_use_sevens_tanka(make_poem, add): make_poem.return_value = ["one", "two", "three", "four", "five"] poem = poems.use(7, "foo", poem_type="tanka") assert "foo" in (poem[1], poem[3], poem[4])