File: test_issue_136.py

package info (click to toggle)
python-sure 2.0.1%2Bgit.2023.02.06.3aef950b7c-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 744 kB
  • sloc: python: 3,512; makefile: 255; sh: 12
file content (21 lines) | stat: -rw-r--r-- 512 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- coding: utf-8 -*-

"""
Test fix of bug described in GitHub Issue #19.
"""

import base64

from sure import expect


def test_issue_136():
    "Test for unicode error when comparing bytes"
    data_b64 = (
        'MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg11zwkcKSsSppm8Du13'
        'je6lmwR7hEVeKMw5L8NQEN/CehRANCAAT9RzcGN/S9yN7mWP+xfLGEuw/TyHRBiW4c'
        'GE6AczRgske/P8eq8trs8unSJPCp0YPKrmCEcuotL/8BHQ4Y1AVK'
    )

    data = base64.b64decode(data_b64)
    expect(data).should.be.equal(data)