コード例 #1
0
    def test_string(self):
        """Check string output."""
        primitive = UserIdentityNegotiation()
        primitive.user_identity_type = 1
        primitive.positive_response_requested = True
        primitive.primary_field = b'\x00\x01'
        primitive.secondary_field = b'\x00\x21'
        assert 'requested: True' in primitive.__str__()
        assert 'type: 1' in primitive.__str__()
        assert 'Primary' in primitive.__str__()
        assert 'Secondary' in primitive.__str__()

        primitive.server_response = b'\x00\x31'
        assert 'Server response' in primitive.__str__()
コード例 #2
0
    def test_string(self):
        """Check string output."""
        primitive = UserIdentityNegotiation()
        primitive.user_identity_type = 1
        primitive.positive_response_requested = True
        primitive.primary_field = b"\x00\x01"
        primitive.secondary_field = b"\x00\x21"
        assert "requested: True" in primitive.__str__()
        assert "type: 1" in primitive.__str__()
        assert "Primary" in primitive.__str__()
        assert "Secondary" in primitive.__str__()

        primitive.server_response = b"\x00\x31"
        assert "Server response" in primitive.__str__()