def test_validate_string_three(self): with pytest.raises(TargetdError) as td: delete_node(None, "\xea\x80\x80abcd\xde\xb4") assert str(td.value) == 'Not a ascii-encoded unicode string'
def test_validate_string_one(self): with pytest.raises(TargetdError) as td: delete_node(None, "") assert str(td.value) == 'Unauthorised empty string'
def test_validate_string_two(self): with pytest.raises(TargetdError) as td: delete_node(None, "1" * 256) assert str(td.value) == 'String too long'
def test_no_records_found(self): with pytest.raises(TargetdError) as td: delete_node(None, "iqn") assert 'no records found' in str(td.value).lower()
def test_validate_string_two(self): with pytest.raises(TargetdError) as td: delete_node(None, "1"*256) assert str(td.value) == 'String too long'