blob: ca4278eadb4f59e848e9f5bd6d7fc66a2d9a12ce [file] [log] [blame]
Yesudeep Mangalapilly5bfe5ff2011-08-16 14:58:32 +05301#!/usr/bin/env python
2# -*- coding: utf-8 -*-
Roy Kokkelkoren0659aac2015-10-25 16:12:11 +01003#
4# Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
Yesudeep Mangalapilly5bfe5ff2011-08-16 14:58:32 +053017
Sybren A. Stüveled1c81d2016-01-14 12:23:32 +010018import unittest
Yesudeep Mangalapilly5bfe5ff2011-08-16 14:58:32 +053019from rsa._compat import b
20from rsa.pem import _markers
21
22
Sybren A. Stüveld3d10342016-01-22 11:36:06 +010023class TestMarkers(unittest.TestCase):
Yesudeep Mangalapilly5bfe5ff2011-08-16 14:58:32 +053024 def test_values(self):
25 self.assertEqual(_markers('RSA PRIVATE KEY'),
26 (b('-----BEGIN RSA PRIVATE KEY-----'),
27 b('-----END RSA PRIVATE KEY-----')))