예제 #1
0
 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'
예제 #2
0
 def test_validate_string_one(self):
     with pytest.raises(TargetdError) as td:
         delete_node(None, "")
     assert str(td.value) == 'Unauthorised empty string'
예제 #3
0
 def test_validate_string_two(self):
     with pytest.raises(TargetdError) as td:
         delete_node(None, "1" * 256)
     assert str(td.value) == 'String too long'
예제 #4
0
 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()
예제 #5
0
 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'
예제 #6
0
 def test_validate_string_two(self):
     with pytest.raises(TargetdError) as td:
         delete_node(None, "1"*256)
     assert str(td.value) == 'String too long'
예제 #7
0
 def test_validate_string_one(self):
     with pytest.raises(TargetdError) as td:
         delete_node(None, "")
     assert str(td.value) == 'Unauthorised empty string'
예제 #8
0
 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()