Esempio n. 1
0
def test_illegal_item_error():
    keys = ['a,', 'b', 'c']
    key = 'a sample value'
    error = IllegalItemError(keys, key)
    output = str(error)
    expected = "[a,][b][c]a sample value"
    assert expected == output
Esempio n. 2
0
 def test_illegal_item_error(self):
     keys = ['a,', 'b', 'c']
     key = 'a sample value'
     error = IllegalItemError(keys, key)
     output = str(error)
     expected = "[a,][b][c]a sample value"
     self.assertEqual(expected, output)
Esempio n. 3
0
def test_illegal_item_error_message():
    keys = ['a,', 'b', 'c']
    key = 'a sample value'
    message = "invalid"
    error = IllegalItemError(keys, key, message)
    output = str(error)
    expected = "[a,][b][c]a sample value - (invalid)"
    assert expected == output