Пример #1
0
 def test_validate_string_three(self):
     with pytest.raises(TargetdError) as td:
         logout_target(None, "\xea\x80\x80abcd\xde\xb4")
     assert str(td.value) == 'Not a ascii-encoded unicode string'
Пример #2
0
 def test_validate_string_one(self):
     with pytest.raises(TargetdError) as td:
         logout_target(None, "")
     assert str(td.value) == 'Unauthorised empty string'
Пример #3
0
 def test_validate_string_two(self):
     with pytest.raises(TargetdError) as td:
         logout_target(None, "1" * 256)
     assert str(td.value) == 'String too long'
Пример #4
0
 def test_no_sessions_found(self):
     with pytest.raises(TargetdError) as td:
         logout_target(None, "iqn")
     assert str(td.value) == ('No matching sessions found')
Пример #5
0
 def test_validate_string_three(self):
     with pytest.raises(TargetdError) as td:
         logout_target(None, "\xea\x80\x80abcd\xde\xb4")
     assert str(td.value) == 'Not a ascii-encoded unicode string'
Пример #6
0
 def test_validate_string_two(self):
     with pytest.raises(TargetdError) as td:
         logout_target(None, "1"*256)
     assert str(td.value) == 'String too long'
Пример #7
0
 def test_validate_string_one(self):
     with pytest.raises(TargetdError) as td:
         logout_target(None, "")
     assert str(td.value) == 'Unauthorised empty string'
Пример #8
0
 def test_no_sessions_found(self):
     with pytest.raises(TargetdError) as td:
         logout_target(None, "iqn")
     assert str(td.value) == ('No matching sessions found')