updated documentation
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Virtual Smart Card — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>Virtual Smart Card — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
|
||||
@@ -12,10 +12,6 @@
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../_static/js/jquery-fix.js"></script>
|
||||
<script src="../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Remote Smart Card Reader" href="../remote-reader/README.html" />
|
||||
@@ -24,6 +20,10 @@
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -103,7 +103,10 @@
|
||||
<li><a class="reference internal" href="#configuring-vpcd-on-unix">Configuring <abbr title="virtual smart card reader">vpcd</abbr> on Unix</a></li>
|
||||
<li><a class="reference internal" href="#configuring-vpcd-on-mac-os-x">Configuring <abbr title="virtual smart card reader">vpcd</abbr> on Mac OS X</a></li>
|
||||
<li><a class="reference internal" href="#configuring-vpcd-on-windows">Configuring <abbr title="virtual smart card reader">vpcd</abbr> on Windows</a></li>
|
||||
<li><a class="reference internal" href="#running-vpicc">Running <abbr title="virtual smart card">vpicc</abbr></a></li>
|
||||
<li><a class="reference internal" href="#running-vpicc">Running <abbr title="virtual smart card">vpicc</abbr></a><ul>
|
||||
<li><a class="reference internal" href="#testing-vpicc-t-epass">Testing <abbr title="virtual smart card">vpicc</abbr> -t ePass</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#question">Question</a></li>
|
||||
@@ -151,7 +154,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="virtual-smart-card">
|
||||
<span id="vicc"></span><h1>Virtual Smart Card<a class="headerlink" href="#virtual-smart-card" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -189,8 +192,25 @@ internet for example.</p>
|
||||
<a class="reference internal" href="../pcsc-relay/README.html#pcsc-relay"><span class="std std-ref">PC/SC Relay</span></a> to make it accessible to an external contact-less smart card
|
||||
reader.</p>
|
||||
<p>The file <code class="file docutils literal notranslate"><span class="pre">utils.py</span></code> was taken from Henryk Plötz’s <a class="reference external" href="https://github.com/henryk/cyberflex-shell">cyberflex-shell</a> <a class="footnote-reference brackets" href="#id3" id="id4">1</a>.</p>
|
||||
<div class="figure" id="id1" style="text-align: center">
|
||||
<p><img src="../_images/tikz-b5a668553fb9bf21fb5abcc4cae46289d11490d1.svg" alt="Figure made with TikZ" /></p>
|
||||
<div class="system-message">
|
||||
<p class="system-message-title">System Message: WARNING/2 (<span class="docutils literal">\input{$wd/bilder/tikzstyles.tex}
|
||||
\node (pcsclite)
|
||||
[klein, aktivbox, inner xsep=.7cm, text width=3cm]
|
||||
{PC/SC Framework\\\
|
||||
(\texttt{pcscd} or \texttt{SCardSvr})
|
||||
};
|
||||
\node (sca) [aktivbox, klein, left=of pcsclite] {Smart Card\\Application};
|
||||
\node (vpcd) [box, at=(pcsclite.east), xshift=-.3cm] {\texttt{vpcd}};
|
||||
\node (vicc) [aktivbox, right=2cm of pcsclite] {\texttt{vicc}};
|
||||
|
||||
\begin{pgfonlayer}{background}
|
||||
\path[linie]
|
||||
(sca) edge (pcsclite)
|
||||
(vpcd) edge node {\includegraphics[width=1.2cm]{$wd/bilder/simplecloud.pdf}} (vicc)
|
||||
;
|
||||
\end{pgfonlayer}</span>)</p>
|
||||
<p>!pdf2svg command cannot be run</p>
|
||||
</div>
|
||||
<p class="caption"><span class="caption-text">Virtual Smart Card used with PCSC-Lite or WinSCard</span></p>
|
||||
</div><div class="versionadded">
|
||||
<p><span class="versionmodified added">New in version 0.7: </span>The Virtual Smart Card optionally brings its own standalone implementation of
|
||||
@@ -198,8 +218,24 @@ PC/SC. This allows accessing <abbr title="virtual smart card">vpicc</abbr> witho
|
||||
implementation acts as replacement for <code class="docutils literal notranslate"><span class="pre">libpcsclite</span></code> which can lead to
|
||||
problems when used in parallel with PCSC-Lite.</p>
|
||||
</div>
|
||||
<div class="figure" id="id2" style="text-align: center">
|
||||
<p><img src="../_images/tikz-c523bba45f9fcaa801dd4f6284c7efa1f320c9b1.svg" alt="Figure made with TikZ" /></p>
|
||||
<div class="system-message">
|
||||
<p class="system-message-title">System Message: WARNING/2 (<span class="docutils literal">\input{$wd/bilder/tikzstyles.tex}
|
||||
\node (pcsclite)
|
||||
[klein, box, text width=4cm]
|
||||
{Virtual Smart Card's\\
|
||||
PC/SC Framework
|
||||
};
|
||||
\node (sca) [aktivbox, klein, left=of pcsclite] {Smart Card\\Application};
|
||||
\node (vicc) [aktivbox, right=2cm of pcsclite] {\texttt{vicc}};
|
||||
|
||||
\begin{pgfonlayer}{background}
|
||||
\path[linie]
|
||||
(sca) edge (pcsclite)
|
||||
(pcsclite) edge node {\includegraphics[width=1.5cm]{$wd/bilder/simplecloud.pdf}} (vicc)
|
||||
;
|
||||
\end{pgfonlayer}</span>)</p>
|
||||
<p>!pdf2svg command cannot be run</p>
|
||||
</div>
|
||||
<p class="caption"><span class="caption-text">Virtual Smart Card used with its own PC/SC implementation</span></p>
|
||||
</div><p>On Android, where a traditional PC/SC framework is not available, you can use
|
||||
our framework to make your real contact-less smart accessible through PKCS#11.
|
||||
@@ -211,10 +247,10 @@ responses via NFC to a contact-less smart card that signs the mail.</p>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#id7" id="id8">3</a></p></li>
|
||||
<li><p><a class="reference external" href="http://pyscard.sourceforge.net/">pyscard</a> <a class="footnote-reference brackets" href="#id9" id="id10">4</a> (relaying a local smart card with <cite>–type=relay</cite>)</p></li>
|
||||
<li><p><a class="reference external" href="https://www.pycryptodome.org/">PyCryptodome</a> <a class="footnote-reference brackets" href="#id11" id="id12">5</a>, <a class="reference external" href="https://www.dlitz.net/software/python-pbkdf2/">PBKDF2</a> <a class="footnote-reference brackets" href="#id13" id="id14">6</a>, <a class="reference external" href="http://www.pythonware.com/products/pil/">PIL</a> <a class="footnote-reference brackets" href="#id19" id="id20">9</a>, <a class="reference external" href="https://docs.python.org/3.3/library/readline.html">readline</a> <a class="footnote-reference brackets" href="#id15" id="id16">7</a> or <a class="reference external" href="https://pypi.python.org/pypi/pyreadline">PyReadline</a> <a class="footnote-reference brackets" href="#id17" id="id18">8</a> (emulation of electronic
|
||||
<li><p>PyCryptodome, <a class="reference external" href="https://www.dlitz.net/software/python-pbkdf2/">PBKDF2</a> <a class="footnote-reference brackets" href="#id11" id="id12">5</a>, <a class="reference external" href="http://www.pythonware.com/products/pil/">PIL</a> <a class="footnote-reference brackets" href="#id17" id="id18">8</a>, <a class="reference external" href="https://docs.python.org/3.3/library/readline.html">readline</a> <a class="footnote-reference brackets" href="#id13" id="id14">6</a> or <a class="reference external" href="https://pypi.python.org/pypi/pyreadline">PyReadline</a> <a class="footnote-reference brackets" href="#id15" id="id16">7</a> (emulation of electronic
|
||||
passport with <cite>–type=ePass</cite>)</p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/frankmorgner/openpace">OpenPACE</a> <a class="footnote-reference brackets" href="#id21" id="id22">10</a> (emulation of German identity card with <cite>–type=nPA</cite>)</p></li>
|
||||
<li><p><a class="reference external" href="https://fukuchi.org/works/qrencode/">libqrencode</a> <a class="footnote-reference brackets" href="#id23" id="id24">11</a> (to print a QR code on the command line for <cite>vpcd-config</cite>; an
|
||||
<li><p><a class="reference external" href="https://github.com/frankmorgner/openpace">OpenPACE</a> <a class="footnote-reference brackets" href="#id19" id="id20">9</a> (emulation of German identity card with <cite>–type=nPA</cite>)</p></li>
|
||||
<li><p><a class="reference external" href="https://fukuchi.org/works/qrencode/">libqrencode</a> <a class="footnote-reference brackets" href="#id21" id="id22">10</a> (to print a QR code on the command line for <cite>vpcd-config</cite>; an
|
||||
URL will be printed if libqrencode is not available)</p></li>
|
||||
</ul>
|
||||
<div class="section" id="download">
|
||||
@@ -223,6 +259,8 @@ URL will be printed if libqrencode is not available)</p></li>
|
||||
still available on <a class="reference external" href="http://sourceforge.net/projects/vsmartcard/files">Sourceforge</a>.</p>
|
||||
<p>Alternatively, you can clone our git repository:</p>
|
||||
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/frankmorgner/vsmartcard.git
|
||||
<span class="nb">cd</span> vsmartcard
|
||||
git submodule update --init --recursive
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -269,10 +307,13 @@ make install
|
||||
PC/SC.</p>
|
||||
</div>
|
||||
<p>For the Windows integration we extended <a class="reference external" href="http://www.codeproject.com/Articles/134010/An-UMDF-Driver-for-a-Virtual-Smart-Card-Reader">Fabio Ottavi’s UMDF Driver for a
|
||||
Virtual Smart Card Reader</a> <a class="footnote-reference brackets" href="#id25" id="id26">12</a> with a <abbr title="virtual smart card reader">vpcd</abbr> interface. To build <abbr title="virtual smart card reader">vpcd</abbr> for
|
||||
Windows we use <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/hardware/ff557573">Windows Driver Kit 10 and Visual Studio 2015</a> <a class="footnote-reference brackets" href="#id28" id="id29">13</a>. The vpcd
|
||||
installer requires the <a class="reference external" href="https://wixtoolset.org/releases/v3.10/stable">WiX Toolset 3.10</a> <a class="footnote-reference brackets" href="#id30" id="id31">14</a>. If you choose
|
||||
to download the <a class="reference external" href="https://github.com/frankmorgner/vsmartcard/releases/download/virtualsmartcard-0.7/virtualsmartcard-0.7_win32.zip">Windows binaries</a> <a class="footnote-reference brackets" href="#id32" id="id33">15</a>, you may directly jump to step 4.</p>
|
||||
Virtual Smart Card Reader</a> <a class="footnote-reference brackets" href="#id23" id="id24">11</a> with a <abbr title="virtual smart card reader">vpcd</abbr> interface. If you choose
|
||||
to download the <a class="reference external" href="https://github.com/frankmorgner/vsmartcard/releases/tag/virtualsmartcard-0.8">Windows binaries</a> <a class="footnote-reference brackets" href="#id30" id="id31">14</a>, you may directly jump to step 4.</p>
|
||||
<p>In the CI environment, we’re building <abbr title="virtual smart card reader">vpcd</abbr> for Windows with Visual Studio
|
||||
Community 2019 with SDK/WDK for Windows 11. (The WDK version needs to match
|
||||
at least your targeted version of Windows, see this <a class="reference external" href="https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk">guide for installing VS
|
||||
with WDK</a> <a class="footnote-reference brackets" href="#id26" id="id27">12</a>) The vpcd installer additionally
|
||||
requires the <a class="reference external" href="https://wixtoolset.org/releases/v3.10/stable">WiX Toolset 3.10</a> <a class="footnote-reference brackets" href="#id28" id="id29">13</a> to be installed.</p>
|
||||
<ol class="arabic">
|
||||
<li><p>Clone the git repository and make sure it is initialized with all
|
||||
submodules:</p>
|
||||
@@ -289,14 +330,23 @@ configuration manager, that the project is built for your platform (i.e.
|
||||
<li><p>If you can successfully <span class="guilabel">Build the solution</span>, you can find
|
||||
the installer (<code class="file docutils literal notranslate"><span class="pre">BixVReaderInstaller.msi</span></code>) in
|
||||
<code class="file docutils literal notranslate"><span class="pre">virtualsmartcard\win32\BixVReaderInstaller\bin\*Release</span></code></p></li>
|
||||
<li><p>To install <abbr title="virtual smart card reader">vpcd</abbr>, double click <code class="file docutils literal notranslate"><span class="pre">BixVReaderInstaller.msi</span></code>. Since we
|
||||
are currently not signing the Installer, this will yield a warning about an
|
||||
unverified driver software publisher on Windows 8 and later. Click
|
||||
<span class="guilabel">Install this driver software anyway</span>.</p></li>
|
||||
<li><p>To import the installer’s test signing certificate, double click
|
||||
<code class="file docutils literal notranslate"><span class="pre">BixVReader.cer</span></code> and add it to the <em>Trusted Root Certification
|
||||
Authority</em> and the <em>Trusted Publishers</em> at the <em>Local Computer” (not the
|
||||
*Current User</em>).</p>
|
||||
<p>On the commandline, you could do this <span class="xref std std-ref">as follows</span>:</p>
|
||||
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>CertMgr.exe /add BixVReader.cer /s /r localMachine root /all
|
||||
CertMgr.exe /add BixVReader.cer /s /r localMachine trustedpublisher
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Feel free to remove the certificate from the certificate stores once the
|
||||
device is installed.</p>
|
||||
</li>
|
||||
<li><p>To install <abbr title="virtual smart card reader">vpcd</abbr>, double click <code class="file docutils literal notranslate"><span class="pre">BixVReaderInstaller.msi</span></code>.</p></li>
|
||||
</ol>
|
||||
<p>For debugging <abbr title="virtual smart card reader">vpcd</abbr> and building the driver with an older version of Visual
|
||||
Studio or WDK please see <a class="reference external" href="http://www.codeproject.com/Articles/134010/An-UMDF-Driver-for-a-Virtual-Smart-Card-Reader">Fabio Ottavi’s UMDF Driver for a Virtual Smart Card
|
||||
Reader</a> <a class="footnote-reference brackets" href="#id25" id="id27">12</a> for details.</p>
|
||||
Reader</a> <a class="footnote-reference brackets" href="#id23" id="id25">11</a> for details.</p>
|
||||
<p>All of Fabio’s card connectors are still available, but inactive by default
|
||||
(see <a class="reference internal" href="#configuring-vpcd-on-windows">Configuring vpcd on Windows</a> below).</p>
|
||||
</div>
|
||||
@@ -454,7 +504,7 @@ to open should be specified in <code class="docutils literal notranslate"><span
|
||||
</div>
|
||||
<div class="section" id="running-vpicc">
|
||||
<h3>Running <abbr title="virtual smart card">vpicc</abbr><a class="headerlink" href="#running-vpicc" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The compiled <a class="reference external" href="https://github.com/frankmorgner/vsmartcard/releases/download/virtualsmartcard-0.7/virtualsmartcard-0.7_win32.zip">Windows binaries</a> <a class="footnote-reference brackets" href="#id32" id="id34">15</a> of <abbr title="virtual smart card">vpicc</abbr> include OpenPACE. The other
|
||||
<p>The compiled <a class="reference external" href="https://github.com/frankmorgner/vsmartcard/releases/tag/virtualsmartcard-0.8">Windows binaries</a> <a class="footnote-reference brackets" href="#id30" id="id32">14</a> of <abbr title="virtual smart card">vpicc</abbr> include OpenPACE. The other
|
||||
dependencies listed above need to be installed seperately. You can start the
|
||||
<abbr title="virtual smart card">vpicc</abbr> via <strong class="command">python.exe vicc.py</strong>. On all other systems an executable
|
||||
script <strong class="command">vicc</strong> is installed using the autotools.</p>
|
||||
@@ -538,8 +588,38 @@ chosen accordingly (<cite>–hostname</cite> and <cite>–port</cite>)
|
||||
<p>When <abbr title="virtual smart card reader">vpcd</abbr> and <abbr title="virtual smart card">vpicc</abbr> are connected you should be able to access the card
|
||||
through the PC/SC API. You can use the <strong class="command">opensc-explorer</strong> or
|
||||
<strong class="command">pcsc_scan</strong> for testing. In Virtual Smart Card’s root directory we also
|
||||
provide scripts for testing with <a class="reference external" href="https://github.com/frankmorgner/OpenSC">npa-tool</a> <a class="footnote-reference brackets" href="#id35" id="id36">16</a> and PCSC-Lite’s smart card
|
||||
provide scripts for testing with <a class="reference external" href="https://github.com/frankmorgner/OpenSC">npa-tool</a> <a class="footnote-reference brackets" href="#id33" id="id34">15</a> and PCSC-Lite’s smart card
|
||||
reader driver tester.</p>
|
||||
<div class="section" id="testing-vpicc-t-epass">
|
||||
<h4>Testing <abbr title="virtual smart card">vpicc</abbr> -t ePass<a class="headerlink" href="#testing-vpicc-t-epass" title="Permalink to this headline">¶</a></h4>
|
||||
<p>A simple tool to test <abbr title="Basic Access Control">BAC</abbr> is available for Python 2.7. On Ubuntu, its
|
||||
requiremets are installed as follows:</p>
|
||||
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo apt-get install python2.7-dev
|
||||
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
|
||||
python2.7 get-pip.py
|
||||
python2.7 -m pip install pycryptodomex pyscard
|
||||
python2.7 readpass.py --no-gui
|
||||
git clone https://github.com/henryk/cyberflex-shell
|
||||
<span class="nb">cd</span> cyberflex-shell
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Now we can create and run a small script:</p>
|
||||
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">echo</span> <span class="s2">"select_application a0000002471001"</span> > script.txt
|
||||
<span class="nb">echo</span> <span class="s2">"perform_bac L898902C<3UTO6908061F9406236ZE184226B<<<<<14"</span> >> script.txt
|
||||
python2.7 cyberflex-shell.py script.txt
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The tool will wait for a (virtual) smart card to appear. Start <abbr title="virtual smart card">vpicc</abbr> and make
|
||||
sure to configure it with the correct MRZ, i.e.
|
||||
<code class="docutils literal notranslate"><span class="pre">P<UTOERIKSSON<<ANNA<MARIX<<<<<<<<<<<<<<<<<<<L898902C<3UTO6908061F9406236ZE184226B<<<<<14</span></code>
|
||||
in this case:</p>
|
||||
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>vicc -t ePass
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Once the card is connected, <code class="docutils literal notranslate"><span class="pre">cyberflex-shell</span></code> will quickly perform <abbr title="Basic Access Control">BAC</abbr> and
|
||||
exit. Running the tool without arguments allows entering in interactive mode
|
||||
to run additional tests.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="question">
|
||||
@@ -563,39 +643,36 @@ more than welcome! Please use our <a class="reference external" href="https://gi
|
||||
<dd><p><a class="reference external" href="http://pyscard.sourceforge.net/">http://pyscard.sourceforge.net/</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id11"><span class="brackets"><a class="fn-backref" href="#id12">5</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://www.pycryptodome.org/">https://www.pycryptodome.org/</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id13"><span class="brackets"><a class="fn-backref" href="#id14">6</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://www.dlitz.net/software/python-pbkdf2/">https://www.dlitz.net/software/python-pbkdf2/</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id15"><span class="brackets"><a class="fn-backref" href="#id16">7</a></span></dt>
|
||||
<dt class="label" id="id13"><span class="brackets"><a class="fn-backref" href="#id14">6</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://docs.python.org/3.3/library/readline.html">https://docs.python.org/3.3/library/readline.html</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id17"><span class="brackets"><a class="fn-backref" href="#id18">8</a></span></dt>
|
||||
<dt class="label" id="id15"><span class="brackets"><a class="fn-backref" href="#id16">7</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://pypi.python.org/pypi/pyreadline">https://pypi.python.org/pypi/pyreadline</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id19"><span class="brackets"><a class="fn-backref" href="#id20">9</a></span></dt>
|
||||
<dt class="label" id="id17"><span class="brackets"><a class="fn-backref" href="#id18">8</a></span></dt>
|
||||
<dd><p><a class="reference external" href="http://www.pythonware.com/products/pil/">http://www.pythonware.com/products/pil/</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id21"><span class="brackets"><a class="fn-backref" href="#id22">10</a></span></dt>
|
||||
<dt class="label" id="id19"><span class="brackets"><a class="fn-backref" href="#id20">9</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://github.com/frankmorgner/openpace">https://github.com/frankmorgner/openpace</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id23"><span class="brackets"><a class="fn-backref" href="#id24">11</a></span></dt>
|
||||
<dt class="label" id="id21"><span class="brackets"><a class="fn-backref" href="#id22">10</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://fukuchi.org/works/qrencode/">https://fukuchi.org/works/qrencode/</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id25"><span class="brackets">12</span><span class="fn-backref">(<a href="#id26">1</a>,<a href="#id27">2</a>)</span></dt>
|
||||
<dt class="label" id="id23"><span class="brackets">11</span><span class="fn-backref">(<a href="#id24">1</a>,<a href="#id25">2</a>)</span></dt>
|
||||
<dd><p><a class="reference external" href="http://www.codeproject.com/Articles/134010/An-UMDF-Driver-for-a-Virtual-Smart-Card-Reader">http://www.codeproject.com/Articles/134010/An-UMDF-Driver-for-a-Virtual-Smart-Card-Reader</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id28"><span class="brackets"><a class="fn-backref" href="#id29">13</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/hardware/ff557573">https://msdn.microsoft.com/en-us/library/windows/hardware/ff557573</a></p>
|
||||
<dt class="label" id="id26"><span class="brackets"><a class="fn-backref" href="#id27">12</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk">https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id30"><span class="brackets"><a class="fn-backref" href="#id31">14</a></span></dt>
|
||||
<dt class="label" id="id28"><span class="brackets"><a class="fn-backref" href="#id29">13</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://wixtoolset.org/releases/v3.10/stable">https://wixtoolset.org/releases/v3.10/stable</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id32"><span class="brackets">15</span><span class="fn-backref">(<a href="#id33">1</a>,<a href="#id34">2</a>)</span></dt>
|
||||
<dd><p><a class="reference external" href="https://github.com/frankmorgner/vsmartcard/releases/download/virtualsmartcard-0.7/virtualsmartcard-0.7_win32.zip">https://github.com/frankmorgner/vsmartcard/releases/download/virtualsmartcard-0.7/virtualsmartcard-0.7_win32.zip</a></p>
|
||||
<dt class="label" id="id30"><span class="brackets">14</span><span class="fn-backref">(<a href="#id31">1</a>,<a href="#id32">2</a>)</span></dt>
|
||||
<dd><p><a class="reference external" href="https://github.com/frankmorgner/vsmartcard/releases/tag/virtualsmartcard-0.8">https://github.com/frankmorgner/vsmartcard/releases/tag/virtualsmartcard-0.8</a></p>
|
||||
</dd>
|
||||
<dt class="label" id="id35"><span class="brackets"><a class="fn-backref" href="#id36">16</a></span></dt>
|
||||
<dt class="label" id="id33"><span class="brackets"><a class="fn-backref" href="#id34">15</a></span></dt>
|
||||
<dd><p><a class="reference external" href="https://github.com/frankmorgner/OpenSC">https://github.com/frankmorgner/OpenSC</a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -614,9 +691,9 @@ more than welcome! Please use our <a class="reference external" href="https://gi
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Creating a Virtual Smart Card — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>Creating a Virtual Smart Card — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
|
||||
@@ -12,10 +12,6 @@
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../_static/js/jquery-fix.js"></script>
|
||||
<script src="../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="prev" title="USB CCID Emulator" href="../ccid/README.html" />
|
||||
@@ -23,6 +19,10 @@
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="creating-a-virtual-smart-card">
|
||||
<span id="virtualsmartcard-api"></span><h1>Creating a Virtual Smart Card<a class="headerlink" href="#creating-a-virtual-smart-card" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -270,14 +270,14 @@ is only a buffer that is forwarded to the smart card OS. First we modify
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sock</span><span class="o">.</span><span class="n">settimeout</span><span class="p">(</span><span class="kc">None</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">server_sock</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="k">except</span> <span class="n">socket</span><span class="o">.</span><span class="n">error</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Failed to open socket: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Is pcscd running at </span><span class="si">%s</span><span class="s2">? Is vpcd loaded? Is a </span><span class="se">\</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Failed to open socket: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Is pcscd running at </span><span class="si">%s</span><span class="s2">? Is vpcd loaded? Is a </span><span class="se">\</span>
|
||||
<span class="s2"> firewall blocking port </span><span class="si">%u</span><span class="s2">?"</span><span class="p">,</span> <span class="n">host</span><span class="p">,</span> <span class="n">port</span><span class="p">)</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="c1"># use reversed connection mode</span>
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="n">local_ip</span> <span class="o">=</span> <span class="p">[(</span><span class="n">s</span><span class="o">.</span><span class="n">connect</span><span class="p">((</span><span class="s1">'8.8.8.8'</span><span class="p">,</span> <span class="mi">53</span><span class="p">)),</span> <span class="n">s</span><span class="o">.</span><span class="n">getsockname</span><span class="p">()[</span><span class="mi">0</span><span class="p">],</span> <span class="n">s</span><span class="o">.</span><span class="n">close</span><span class="p">())</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="p">[</span><span class="n">socket</span><span class="o">.</span><span class="n">socket</span><span class="p">(</span><span class="n">socket</span><span class="o">.</span><span class="n">AF_INET</span><span class="p">,</span> <span class="n">socket</span><span class="o">.</span><span class="n">SOCK_DGRAM</span><span class="p">)]][</span><span class="mi">0</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span>
|
||||
<span class="n">local_ip</span> <span class="o">=</span> <span class="p">[(</span><span class="n">s</span><span class="o">.</span><span class="n">connect</span><span class="p">((</span><span class="s1">'9.9.9.9'</span><span class="p">,</span> <span class="mi">53</span><span class="p">)),</span> <span class="n">s</span><span class="o">.</span><span class="n">getsockname</span><span class="p">()[</span><span class="mi">0</span><span class="p">],</span> <span class="n">s</span><span class="o">.</span><span class="n">close</span><span class="p">())</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="p">[</span><span class="n">socket</span><span class="o">.</span><span class="n">socket</span><span class="p">(</span><span class="n">socket</span><span class="o">.</span><span class="n">AF_INET</span><span class="p">,</span> <span class="n">socket</span><span class="o">.</span><span class="n">SOCK_DGRAM</span><span class="p">)]][</span><span class="mi">0</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span>
|
||||
<span class="n">custom_url</span> <span class="o">=</span> <span class="s1">'vicc://</span><span class="si">%s</span><span class="s1">:</span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">local_ip</span><span class="p">,</span> <span class="n">port</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s1">'VICC hostname: </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="n">local_ip</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s1">'VICC port: </span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="n">port</span><span class="p">)</span>
|
||||
@@ -292,8 +292,8 @@ is only a buffer that is forwarded to the smart card OS. First we modify
|
||||
<span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sock</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">server_sock</span><span class="p">,</span> <span class="n">host</span><span class="p">)</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">openPort</span><span class="p">(</span><span class="n">port</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">sock</span><span class="o">.</span><span class="n">settimeout</span><span class="p">(</span><span class="kc">None</span><span class="p">)</span>
|
||||
<span class="k">except</span> <span class="n">socket</span><span class="o">.</span><span class="n">error</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Failed to open socket: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Is pcscd running? Is vpcd loaded and in </span><span class="se">\</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Failed to open socket: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Is pcscd running? Is vpcd loaded and in </span><span class="se">\</span>
|
||||
<span class="s2"> reversed connection mode? Is a firewall </span><span class="se">\</span>
|
||||
<span class="s2"> blocking port </span><span class="si">%u</span><span class="s2">?"</span><span class="p">,</span> <span class="n">port</span><span class="p">)</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
@@ -339,9 +339,7 @@ completely different when creating a file on the smart card. So we derive
|
||||
<a class="reference internal" href="api/virtualsmartcard.cards.cryptoflex.html#virtualsmartcard.cards.cryptoflex.CryptoflexMF" title="virtualsmartcard.cards.cryptoflex.CryptoflexMF"><code class="xref py py-class docutils literal notranslate"><span class="pre">CryptoflexMF</span></code></a> from
|
||||
<a class="reference internal" href="api/virtualsmartcard.SmartcardFilesystem.html#virtualsmartcard.SmartcardFilesystem.MF" title="virtualsmartcard.SmartcardFilesystem.MF"><code class="xref py py-class docutils literal notranslate"><span class="pre">MF</span></code></a> and modify
|
||||
<a class="reference internal" href="api/virtualsmartcard.cards.cryptoflex.html#virtualsmartcard.cards.cryptoflex.CryptoflexMF.create" title="virtualsmartcard.cards.cryptoflex.CryptoflexMF.create"><code class="xref py py-class docutils literal notranslate"><span class="pre">create</span></code></a> to our needs.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="k">def</span> <span class="nf">create</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="n">p2</span><span class="p">,</span> <span class="n">data</span><span class="p">):</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">2</span><span class="p">]</span> <span class="o">!=</span> <span class="s2">"</span><span class="se">\xff\xff</span><span class="s2">"</span><span class="p">:</span>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">2</span><span class="p">]</span> <span class="o">!=</span> <span class="sa">b</span><span class="s2">"</span><span class="se">\xff\xff</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">raise</span> <span class="n">SwError</span><span class="p">(</span><span class="n">SW</span><span class="p">[</span><span class="s2">"ERR_INCORRECTPARAMETERS"</span><span class="p">])</span>
|
||||
|
||||
<span class="n">args</span> <span class="o">=</span> <span class="p">{</span>
|
||||
@@ -349,11 +347,11 @@ completely different when creating a file on the smart card. So we derive
|
||||
<span class="s2">"filedescriptor"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"fid"</span><span class="p">:</span> <span class="n">stringtoint</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="mi">4</span><span class="p">:</span><span class="mi">6</span><span class="p">]),</span>
|
||||
<span class="p">}</span>
|
||||
<span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"</span><span class="se">\x01</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sa">b</span><span class="s2">"</span><span class="se">\x01</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="n">args</span><span class="p">[</span><span class="s2">"data"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">bytes</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span><span class="o">*</span><span class="n">stringtoint</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="mi">2</span><span class="p">:</span><span class="mi">4</span><span class="p">])</span>
|
||||
<span class="n">args</span><span class="p">[</span><span class="s2">"filedescriptor"</span><span class="p">]</span> <span class="o">=</span> <span class="n">FDB</span><span class="p">[</span><span class="s2">"EFSTRUCTURE_TRANSPARENT"</span><span class="p">]</span>
|
||||
<span class="n">new_file</span> <span class="o">=</span> <span class="n">TransparentStructureEF</span><span class="p">(</span><span class="o">**</span><span class="n">args</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"</span><span class="se">\x02</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">elif</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sa">b</span><span class="s2">"</span><span class="se">\x02</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="p">)</span> <span class="o">></span> <span class="mi">16</span><span class="p">:</span>
|
||||
<span class="n">args</span><span class="p">[</span><span class="s2">"maxrecordsize"</span><span class="p">]</span> <span class="o">=</span> <span class="n">stringtoint</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="mi">16</span><span class="p">])</span>
|
||||
<span class="k">elif</span> <span class="n">p2</span><span class="p">:</span>
|
||||
@@ -362,15 +360,15 @@ completely different when creating a file on the smart card. So we derive
|
||||
<span class="n">args</span><span class="p">[</span><span class="s2">"filedescriptor"</span><span class="p">]</span> <span class="o">=</span> <span class="n">FDB</span><span class="p">[</span><span class="s2">"EFSTRUCTURE_LINEAR_FIXED_"</span>
|
||||
<span class="s2">"NOFURTHERINFO"</span><span class="p">]</span>
|
||||
<span class="n">new_file</span> <span class="o">=</span> <span class="n">RecordStructureEF</span><span class="p">(</span><span class="o">**</span><span class="n">args</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"</span><span class="se">\x03</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">elif</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sa">b</span><span class="s2">"</span><span class="se">\x03</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="n">args</span><span class="p">[</span><span class="s2">"filedescriptor"</span><span class="p">]</span> <span class="o">=</span> <span class="n">FDB</span><span class="p">[</span><span class="s2">"EFSTRUCTURE_LINEAR_VARIABLE_"</span>
|
||||
<span class="s2">"NOFURTHERINFO"</span><span class="p">]</span>
|
||||
<span class="n">new_file</span> <span class="o">=</span> <span class="n">RecordStructureEF</span><span class="p">(</span><span class="o">**</span><span class="n">args</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"</span><span class="se">\x04</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">elif</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sa">b</span><span class="s2">"</span><span class="se">\x04</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="n">args</span><span class="p">[</span><span class="s2">"filedescriptor"</span><span class="p">]</span> <span class="o">=</span> <span class="n">FDB</span><span class="p">[</span><span class="s2">"EFSTRUCTURE_CYCLIC_NOFURTHERINFO"</span><span class="p">]</span>
|
||||
<span class="n">new_file</span> <span class="o">=</span> <span class="n">RecordStructureEF</span><span class="p">(</span><span class="o">**</span><span class="n">args</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"</span><span class="se">\x38</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">12</span><span class="p">]</span> <span class="o">!=</span> <span class="s2">"</span><span class="se">\x03</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">elif</span> <span class="n">data</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="sa">b</span><span class="s2">"</span><span class="se">\x38</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">data</span><span class="p">[</span><span class="mi">12</span><span class="p">]</span> <span class="o">!=</span> <span class="sa">b</span><span class="s2">"</span><span class="se">\x03</span><span class="s2">"</span><span class="p">:</span>
|
||||
<span class="k">raise</span> <span class="n">SwError</span><span class="p">(</span><span class="n">SW</span><span class="p">[</span><span class="s2">"ERR_INCORRECTPARAMETERS"</span><span class="p">])</span>
|
||||
<span class="n">new_file</span> <span class="o">=</span> <span class="n">DF</span><span class="p">(</span><span class="o">**</span><span class="n">args</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
@@ -378,6 +376,8 @@ completely different when creating a file on the smart card. So we derive
|
||||
<span class="k">raise</span> <span class="n">SwError</span><span class="p">(</span><span class="n">SW</span><span class="p">[</span><span class="s2">"ERR_INCORRECTPARAMETERS"</span><span class="p">])</span>
|
||||
|
||||
<span class="k">return</span> <span class="p">[</span><span class="n">new_file</span><span class="p">]</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">recordHandlingDecode</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">p1</span><span class="p">,</span> <span class="n">p2</span><span class="p">):</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>As you can see it is quite simple to extend the virtual smart card to your
|
||||
@@ -393,7 +393,7 @@ magic that is done while parsing a buffer (an <abbr title="Application Protocol
|
||||
connect to an other smart card using PC/SC and forward it to <abbr title="virtual smart card reader">vpcd</abbr>.</p>
|
||||
<p>As before with the cryptoflex card, we let
|
||||
<a class="reference internal" href="api/virtualsmartcard.VirtualSmartcard.html#virtualsmartcard.VirtualSmartcard.VirtualICC" title="virtualsmartcard.VirtualSmartcard.VirtualICC"><code class="xref py py-class docutils literal notranslate"><span class="pre">VirtualICC</span></code></a> recognize the new type
|
||||
<code class="docutils literal notranslate"><span class="pre">"relay"</span></code>. <a class="reference internal" href="api/virtualsmartcard.cards.Relay.html#virtualsmartcard.cards.Relay.RelayOS" title="virtualsmartcard.cards.Relay.RelayOS"><code class="xref py py-class docutils literal notranslate"><span class="pre">RelayOS</span></code></a> overwrites all
|
||||
<code class="docutils literal notranslate"><span class="pre">"relay"</span></code>. <code class="xref py py-class docutils literal notranslate"><span class="pre">RelayOS</span></code> overwrites all
|
||||
main functions from the template
|
||||
<a class="reference internal" href="api/virtualsmartcard.VirtualSmartcard.html#virtualsmartcard.VirtualSmartcard.SmartcardOS" title="virtualsmartcard.VirtualSmartcard.SmartcardOS"><code class="xref py py-class docutils literal notranslate"><span class="pre">SmartcardOS</span></code></a>. Its functions correspond
|
||||
to the <a class="reference internal" href="#vpcd-commands"><span class="std std-ref">commands sent by vpcd</span></a>. If you know how to use
|
||||
@@ -415,7 +415,7 @@ forward, but see yourself…</p>
|
||||
<span class="c1"># See which readers are available</span>
|
||||
<span class="n">readers</span> <span class="o">=</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">System</span><span class="o">.</span><span class="n">listReaders</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">readers</span><span class="p">)</span> <span class="o"><=</span> <span class="n">readernum</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Invalid number of reader '</span><span class="si">%u</span><span class="s2">' (only </span><span class="si">%u</span><span class="s2"> available)"</span><span class="p">,</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Invalid number of reader '</span><span class="si">%u</span><span class="s2">' (only </span><span class="si">%u</span><span class="s2"> available)"</span><span class="p">,</span>
|
||||
<span class="n">readernum</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">readers</span><span class="p">))</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
|
||||
@@ -427,7 +427,7 @@ forward, but see yourself…</p>
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">session</span> <span class="o">=</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">Session</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">reader</span><span class="p">)</span>
|
||||
<span class="k">except</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">Exceptions</span><span class="o">.</span><span class="n">CardConnectionException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Error connecting to card: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">message</span><span class="p">)</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Error connecting to card: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Connected to card in '</span><span class="si">%s</span><span class="s2">'"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">reader</span><span class="p">)</span>
|
||||
@@ -443,7 +443,7 @@ forward, but see yourself…</p>
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
|
||||
<span class="k">except</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">Exceptions</span><span class="o">.</span><span class="n">CardConnectionException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">"Error disconnecting from card: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">message</span><span class="p">)</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">"Error disconnecting from card: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">getATR</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="c1"># when powerDown has been called, fetching the ATR will throw an error.</span>
|
||||
@@ -457,7 +457,7 @@ forward, but see yourself…</p>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">session</span> <span class="o">=</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">Session</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">reader</span><span class="p">)</span>
|
||||
<span class="n">atr</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">getATR</span><span class="p">()</span>
|
||||
<span class="k">except</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">Exceptions</span><span class="o">.</span><span class="n">CardConnectionException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Error getting ATR: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">message</span><span class="p">)</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Error getting ATR: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
|
||||
<span class="k">return</span> <span class="s2">""</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">chr</span><span class="p">(</span><span class="n">b</span><span class="p">)</span> <span class="k">for</span> <span class="n">b</span> <span class="ow">in</span> <span class="n">atr</span><span class="p">])</span>
|
||||
@@ -473,7 +473,7 @@ forward, but see yourself…</p>
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">session</span> <span class="o">=</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">Session</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">reader</span><span class="p">)</span>
|
||||
<span class="k">except</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">Exceptions</span><span class="o">.</span><span class="n">CardConnectionException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Error connecting to card: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">e</span><span class="o">.</span><span class="n">message</span><span class="p">)</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Error connecting to card: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">powerDown</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
@@ -482,7 +482,7 @@ forward, but see yourself…</p>
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
|
||||
<span class="k">except</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">Exceptions</span><span class="o">.</span><span class="n">CardConnectionException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Error disconnecting from card: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Error disconnecting from card: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
@@ -501,7 +501,7 @@ forward, but see yourself…</p>
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="n">rapdu</span><span class="p">,</span> <span class="n">sw1</span><span class="p">,</span> <span class="n">sw2</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">sendCommandAPDU</span><span class="p">(</span><span class="n">apdu</span><span class="p">)</span>
|
||||
<span class="k">except</span> <span class="n">smartcard</span><span class="o">.</span><span class="n">Exceptions</span><span class="o">.</span><span class="n">CardConnectionException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Error transmitting APDU: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">critical</span><span class="p">(</span><span class="s2">"Error transmitting APDU: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
|
||||
|
||||
<span class="c1"># XXX this is a workaround, see on sourceforge bug #3083586</span>
|
||||
@@ -534,7 +534,7 @@ forward, but see yourself…</p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>CardGenerator Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>CardGenerator Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="cardgenerator-module">
|
||||
<h1>CardGenerator Module<a class="headerlink" href="#cardgenerator-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -202,7 +202,7 @@ optionally for the path to a photo.</p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ConstantDefinitions Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>ConstantDefinitions Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="constantdefinitions-module">
|
||||
<h1>ConstantDefinitions Module<a class="headerlink" href="#constantdefinitions-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>CryptoUtils Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>CryptoUtils Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="cryptoutils-module">
|
||||
<h1>CryptoUtils Module<a class="headerlink" href="#cryptoutils-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -232,7 +232,7 @@ Only used by the “CC” algorithm</p></li>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SEutils Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>SEutils Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="seutils-module">
|
||||
<h1>SEutils Module<a class="headerlink" href="#seutils-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -579,7 +579,7 @@ contain a data to sign (tag 0x9A, 0xAC or 0xBC) and a digital signature
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SWutils Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>SWutils Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="swutils-module">
|
||||
<h1>SWutils Module<a class="headerlink" href="#swutils-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -162,7 +162,7 @@ set self.__traceback__ to tb and return self.</p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SmartcardFilesystem Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>SmartcardFilesystem Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="smartcardfilesystem-module">
|
||||
<h1>SmartcardFilesystem Module<a class="headerlink" href="#smartcardfilesystem-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -138,7 +138,7 @@
|
||||
<area shape="rect" id="node5" href="#virtualsmartcard.SmartcardFilesystem.Record" target="_top" title="virtualsmartcard.SmartcardFilesystem.Record" alt="" coords="4,4,218,20"/>
|
||||
</map><span class="target" id="module-virtualsmartcard.SmartcardFilesystem"></span><dl class="py class">
|
||||
<dt id="virtualsmartcard.SmartcardFilesystem.DF">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.SmartcardFilesystem.</span></code><code class="sig-name descname"><span class="pre">DF</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parent</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fid</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">filedescriptor</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">56</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lifecycle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simpletlv_data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bertlv_data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dfname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.SmartcardFilesystem.DF" title="Permalink to this definition">¶</a></dt>
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.SmartcardFilesystem.</span></code><code class="sig-name descname"><span class="pre">DF</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parent</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fid</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">filedescriptor</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">56</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lifecycle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simpletlv_data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bertlv_data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dfname</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">b''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.SmartcardFilesystem.DF" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#virtualsmartcard.SmartcardFilesystem.File" title="virtualsmartcard.SmartcardFilesystem.File"><code class="xref py py-class docutils literal notranslate"><span class="pre">virtualsmartcard.SmartcardFilesystem.File</span></code></a></p>
|
||||
<p>Class for a dedicated file</p>
|
||||
<dl class="py method">
|
||||
@@ -1189,7 +1189,7 @@ data as binary string.</p>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="virtualsmartcard.SmartcardFilesystem.Record">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.SmartcardFilesystem.</span></code><code class="sig-name descname"><span class="pre">Record</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">identifier</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.SmartcardFilesystem.Record" title="Permalink to this definition">¶</a></dt>
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.SmartcardFilesystem.</span></code><code class="sig-name descname"><span class="pre">Record</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">identifier</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">b''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.SmartcardFilesystem.Record" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.SmartcardFilesystem.Record.data">
|
||||
@@ -1455,7 +1455,7 @@ __getRecords).</p>
|
||||
|
||||
<dl class="py class">
|
||||
<dt id="virtualsmartcard.SmartcardFilesystem.TransparentStructureEF">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.SmartcardFilesystem.</span></code><code class="sig-name descname"><span class="pre">TransparentStructureEF</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parent</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fid</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">filedescriptor</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lifecycle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simpletlv_data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bertlv_data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">datacoding</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shortfid</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.SmartcardFilesystem.TransparentStructureEF" title="Permalink to this definition">¶</a></dt>
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.SmartcardFilesystem.</span></code><code class="sig-name descname"><span class="pre">TransparentStructureEF</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parent</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fid</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">filedescriptor</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lifecycle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simpletlv_data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bertlv_data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">datacoding</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shortfid</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">b''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.SmartcardFilesystem.TransparentStructureEF" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="#virtualsmartcard.SmartcardFilesystem.EF" title="virtualsmartcard.SmartcardFilesystem.EF"><code class="xref py py-class docutils literal notranslate"><span class="pre">virtualsmartcard.SmartcardFilesystem.EF</span></code></a></p>
|
||||
<p>Class for an elementary file with transparent structure.</p>
|
||||
<dl class="py method">
|
||||
@@ -1708,7 +1708,7 @@ DCB[“PROPRIETARY”] (logical xor)</p></li>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SmartcardSAM Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>SmartcardSAM Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="smartcardsam-module">
|
||||
<h1>SmartcardSAM Module<a class="headerlink" href="#smartcardsam-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -430,7 +430,7 @@ string that is understood by CryptoUtils.py functions</p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>TLVutils Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>TLVutils Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="tlvutils-module">
|
||||
<h1>TLVutils Module<a class="headerlink" href="#tlvutils-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -238,7 +238,7 @@ results will be returned.</p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>VirtualSmartcard Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>VirtualSmartcard Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="virtualsmartcard-module">
|
||||
<h1>VirtualSmartcard Module<a class="headerlink" href="#virtualsmartcard-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -335,7 +335,7 @@ respsonse APDU back to the vpcd.</p>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="virtualsmartcard.VirtualSmartcard.loadMitMFromPath">
|
||||
<code class="sig-prename descclassname"><span class="pre">virtualsmartcard.VirtualSmartcard.</span></code><code class="sig-name descname"><span class="pre">loadMitMFromPath</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.VirtualSmartcard.loadMitMFromPath" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="sig-prename descclassname"><span class="pre">virtualsmartcard.VirtualSmartcard.</span></code><code class="sig-name descname"><span class="pre">loadMitMFromPath</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.VirtualSmartcard.loadMitMFromPath" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</div>
|
||||
@@ -352,7 +352,7 @@ respsonse APDU back to the vpcd.</p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -1,202 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>HandlerTest Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
</head><body>
|
||||
|
||||
<a href="https://github.com/frankmorgner/vsmartcard"
|
||||
class="visible-desktop hidden-xs"><img
|
||||
id="gh-banner"
|
||||
style="position: absolute; top: 50px; right: 0; border: 0;"
|
||||
src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"
|
||||
alt="Fork me on GitHub"></a>
|
||||
<script>
|
||||
// Adjust banner height.
|
||||
$(function () {
|
||||
var navHeight = $(".navbar .container").css("height");
|
||||
$("#gh-banner").css("top", navHeight);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="navbar" class="navbar navbar-default ">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../index.html">
|
||||
vsmartcard</a>
|
||||
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse nav-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
|
||||
<li class="dropdown globaltoc-container">
|
||||
<a role="button"
|
||||
id="dLabelGlobalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="../../index.html">Site <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu globaltoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelGlobalToc"><ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../README.html">Virtual Smart Card</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../remote-reader/README.html">Remote Smart Card Reader</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ACardEmulator/README.html">Android Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../TCardEmulator/README.html">Tizen Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../pcsc-relay/README.html">PC/SC Relay</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ccid/README.html">USB CCID Emulator</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api.html">Creating a Virtual Smart Card</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a role="button"
|
||||
id="dLabelLocalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="#">Page <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu localtoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelLocalToc"><ul>
|
||||
<li><a class="reference internal" href="#">HandlerTest Module</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="hidden-sm"></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<form class="navbar-form navbar-right" action="../../search.html" method="get">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search" />
|
||||
</div>
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
|
||||
<div class="section" id="handlertest-module">
|
||||
<h1>HandlerTest Module<a class="headerlink" href="#handlertest-module" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="graphviz"><img src="../../_images/inheritance-5c600c60a9fcc658bb9a017dd609c3bff8e456b3.png" alt="Inheritance diagram of virtualsmartcard.cards.HandlerTest" usemap="#inheritancee548df9983" class="inheritance graphviz" /></div>
|
||||
<map id="inheritancee548df9983" name="inheritancee548df9983">
|
||||
<area shape="rect" id="node1" href="virtualsmartcard.VirtualSmartcard.html#virtualsmartcard.VirtualSmartcard.SmartcardOS" target="_top" title="Base class for a smart card OS" alt="" coords="5,5,339,31"/>
|
||||
<area shape="rect" id="node2" href="#virtualsmartcard.cards.HandlerTest.HandlerTestOS" target="_top" title="This class implements the commands used for the PC/SC-lite  smart  card" alt="" coords="387,5,736,31"/>
|
||||
</map><span class="target" id="module-virtualsmartcard.cards.HandlerTest"></span><dl class="py class">
|
||||
<dt id="virtualsmartcard.cards.HandlerTest.HandlerTestOS">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.cards.HandlerTest.</span></code><code class="sig-name descname"><span class="pre">HandlerTestOS</span></code><a class="headerlink" href="#virtualsmartcard.cards.HandlerTest.HandlerTestOS" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="virtualsmartcard.VirtualSmartcard.html#virtualsmartcard.VirtualSmartcard.SmartcardOS" title="virtualsmartcard.VirtualSmartcard.SmartcardOS"><code class="xref py py-class docutils literal notranslate"><span class="pre">virtualsmartcard.VirtualSmartcard.SmartcardOS</span></code></a></p>
|
||||
<p>This class implements the commands used for the PC/SC-lite smart card
|
||||
reader driver tester. See <a class="reference external" href="https://salsa.debian.org/rousseau/HandlerTest">https://salsa.debian.org/rousseau/HandlerTest</a>
|
||||
and handler_test(1).</p>
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.HandlerTest.HandlerTestOS.__output_from_le">
|
||||
<code class="sig-name descname"><span class="pre">__output_from_le</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.HandlerTest.HandlerTestOS.__output_from_le" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.HandlerTest.HandlerTestOS.execute">
|
||||
<code class="sig-name descname"><span class="pre">execute</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.HandlerTest.HandlerTestOS.execute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns response to the given APDU as string of characters</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>msg</strong> – the APDU as string of characters</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.HandlerTest.HandlerTestOS.getATR">
|
||||
<code class="sig-name descname"><span class="pre">getATR</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.HandlerTest.HandlerTestOS.getATR" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns the ATR of the card as string of characters</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.HandlerTest.HandlerTestOS.powerDown">
|
||||
<code class="sig-name descname"><span class="pre">powerDown</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.HandlerTest.HandlerTestOS.powerDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Powers down the card</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.HandlerTest.HandlerTestOS.powerUp">
|
||||
<code class="sig-name descname"><span class="pre">powerUp</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.HandlerTest.HandlerTestOS.powerUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Powers up the card</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.HandlerTest.HandlerTestOS.reset">
|
||||
<code class="sig-name descname"><span class="pre">reset</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.HandlerTest.HandlerTestOS.reset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Performs a warm reset of the card (no power down)</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="pull-right">
|
||||
<a href="#">Back to top</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,204 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Relay Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
</head><body>
|
||||
|
||||
<a href="https://github.com/frankmorgner/vsmartcard"
|
||||
class="visible-desktop hidden-xs"><img
|
||||
id="gh-banner"
|
||||
style="position: absolute; top: 50px; right: 0; border: 0;"
|
||||
src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"
|
||||
alt="Fork me on GitHub"></a>
|
||||
<script>
|
||||
// Adjust banner height.
|
||||
$(function () {
|
||||
var navHeight = $(".navbar .container").css("height");
|
||||
$("#gh-banner").css("top", navHeight);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="navbar" class="navbar navbar-default ">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../index.html">
|
||||
vsmartcard</a>
|
||||
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse nav-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
|
||||
<li class="dropdown globaltoc-container">
|
||||
<a role="button"
|
||||
id="dLabelGlobalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="../../index.html">Site <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu globaltoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelGlobalToc"><ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../README.html">Virtual Smart Card</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../remote-reader/README.html">Remote Smart Card Reader</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ACardEmulator/README.html">Android Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../TCardEmulator/README.html">Tizen Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../pcsc-relay/README.html">PC/SC Relay</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ccid/README.html">USB CCID Emulator</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api.html">Creating a Virtual Smart Card</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a role="button"
|
||||
id="dLabelLocalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="#">Page <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu localtoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelLocalToc"><ul>
|
||||
<li><a class="reference internal" href="#">Relay Module</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="hidden-sm"></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<form class="navbar-form navbar-right" action="../../search.html" method="get">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search" />
|
||||
</div>
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
|
||||
<div class="section" id="relay-module">
|
||||
<h1>Relay Module<a class="headerlink" href="#relay-module" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="graphviz"><img src="../../_images/inheritance-c92efbd974214a247217ba79cf0775fb65c344af.png" alt="Inheritance diagram of virtualsmartcard.cards.Relay" usemap="#inheritanceeed1b727ec" class="inheritance graphviz" /></div>
|
||||
<map id="inheritanceeed1b727ec" name="inheritanceeed1b727ec">
|
||||
<area shape="rect" id="node1" href="virtualsmartcard.VirtualSmartcard.html#virtualsmartcard.VirtualSmartcard.SmartcardOS" target="_top" title="Base class for a smart card OS" alt="" coords="5,5,339,31"/>
|
||||
<area shape="rect" id="node2" href="#virtualsmartcard.cards.Relay.RelayOS" target="_top" title="This class implements relaying of a (physical) smartcard. The RelayOS" alt="" coords="387,5,653,31"/>
|
||||
</map><span class="target" id="module-virtualsmartcard.cards.Relay"></span><dl class="py class">
|
||||
<dt id="virtualsmartcard.cards.Relay.RelayOS">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.cards.Relay.</span></code><code class="sig-name descname"><span class="pre">RelayOS</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">readernum</span></em>, <em class="sig-param"><span class="pre">mitm=<virtualsmartcard.cards.RelayMiddleman.RelayMiddleman</span> <span class="pre">object></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.Relay.RelayOS" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <a class="reference internal" href="virtualsmartcard.VirtualSmartcard.html#virtualsmartcard.VirtualSmartcard.SmartcardOS" title="virtualsmartcard.VirtualSmartcard.SmartcardOS"><code class="xref py py-class docutils literal notranslate"><span class="pre">virtualsmartcard.VirtualSmartcard.SmartcardOS</span></code></a></p>
|
||||
<p>This class implements relaying of a (physical) smartcard. The RelayOS
|
||||
forwards the command APDUs received from the vpcd to the real smartcard via
|
||||
an actual smart card reader and sends the responses back to the vpcd.
|
||||
This class can be used to implement relay or MitM attacks.</p>
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.Relay.RelayOS.cleanup">
|
||||
<code class="sig-name descname"><span class="pre">cleanup</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.Relay.RelayOS.cleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Close the connection to the physical card</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.Relay.RelayOS.execute">
|
||||
<code class="sig-name descname"><span class="pre">execute</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.Relay.RelayOS.execute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns response to the given APDU as string of characters</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>msg</strong> – the APDU as string of characters</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.Relay.RelayOS.getATR">
|
||||
<code class="sig-name descname"><span class="pre">getATR</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.Relay.RelayOS.getATR" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns the ATR of the card as string of characters</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.Relay.RelayOS.powerDown">
|
||||
<code class="sig-name descname"><span class="pre">powerDown</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.Relay.RelayOS.powerDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Powers down the card</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.Relay.RelayOS.powerUp">
|
||||
<code class="sig-name descname"><span class="pre">powerUp</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.Relay.RelayOS.powerUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Powers up the card</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.Relay.RelayOS.reset">
|
||||
<code class="sig-name descname"><span class="pre">reset</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.Relay.RelayOS.reset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Performs a warm reset of the card (no power down)</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="pull-right">
|
||||
<a href="#">Back to top</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,177 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>RelayMiddleman Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
</head><body>
|
||||
|
||||
<a href="https://github.com/frankmorgner/vsmartcard"
|
||||
class="visible-desktop hidden-xs"><img
|
||||
id="gh-banner"
|
||||
style="position: absolute; top: 50px; right: 0; border: 0;"
|
||||
src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"
|
||||
alt="Fork me on GitHub"></a>
|
||||
<script>
|
||||
// Adjust banner height.
|
||||
$(function () {
|
||||
var navHeight = $(".navbar .container").css("height");
|
||||
$("#gh-banner").css("top", navHeight);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="navbar" class="navbar navbar-default ">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../index.html">
|
||||
vsmartcard</a>
|
||||
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse nav-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
|
||||
<li class="dropdown globaltoc-container">
|
||||
<a role="button"
|
||||
id="dLabelGlobalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="../../index.html">Site <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu globaltoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelGlobalToc"><ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../README.html">Virtual Smart Card</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../remote-reader/README.html">Remote Smart Card Reader</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ACardEmulator/README.html">Android Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../TCardEmulator/README.html">Tizen Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../pcsc-relay/README.html">PC/SC Relay</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ccid/README.html">USB CCID Emulator</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api.html">Creating a Virtual Smart Card</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a role="button"
|
||||
id="dLabelLocalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="#">Page <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu localtoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelLocalToc"><ul>
|
||||
<li><a class="reference internal" href="#">RelayMiddleman Module</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="hidden-sm"></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<form class="navbar-form navbar-right" action="../../search.html" method="get">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search" />
|
||||
</div>
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
|
||||
<div class="section" id="relaymiddleman-module">
|
||||
<h1>RelayMiddleman Module<a class="headerlink" href="#relaymiddleman-module" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="graphviz"><img src="../../_images/inheritance-95149f9804291dbbbe502519b9ab8d95f3e28f93.png" alt="Inheritance diagram of virtualsmartcard.cards.RelayMiddleman" usemap="#inheritancea75424a3c7" class="inheritance graphviz" /></div>
|
||||
<map id="inheritancea75424a3c7" name="inheritancea75424a3c7">
|
||||
<area shape="rect" id="node1" href="#virtualsmartcard.cards.RelayMiddleman.RelayMiddleman" target="_top" title="The RelayMiddleman class serves as a base from which a user might derive" alt="" coords="5,5,403,31"/>
|
||||
</map><span class="target" id="module-virtualsmartcard.cards.RelayMiddleman"></span><dl class="py class">
|
||||
<dt id="virtualsmartcard.cards.RelayMiddleman.RelayMiddleman">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.cards.RelayMiddleman.</span></code><code class="sig-name descname"><span class="pre">RelayMiddleman</span></code><a class="headerlink" href="#virtualsmartcard.cards.RelayMiddleman.RelayMiddleman" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<p>The RelayMiddleman class serves as a base from which a user might derive
|
||||
their own relay middle man class. This base class implements the simplest
|
||||
Man-in-the-Middle: the NoOp.</p>
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.RelayMiddleman.RelayMiddleman.handleInPDU">
|
||||
<code class="sig-name descname"><span class="pre">handleInPDU</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inPDU</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">bytes</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.RelayMiddleman.RelayMiddleman.handleInPDU" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This method is called on each PDU that is fed into the realy (vdpu -> vicc).
|
||||
It may be overwritten to modify the packages send from the terminal to the
|
||||
real smart card.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.cards.RelayMiddleman.RelayMiddleman.handleOutPDU">
|
||||
<code class="sig-name descname"><span class="pre">handleOutPDU</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">outPDU</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">bytes</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.cards.RelayMiddleman.RelayMiddleman.handleOutPDU" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This method is called on each PDU that is produced by the relay (vicc -> vdpu).
|
||||
It may be overwritten to modify the packages send from the real smart card to the
|
||||
terminal.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="pull-right">
|
||||
<a href="#">Back to top</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>cryptoflex Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>cryptoflex Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="cryptoflex-module">
|
||||
<h1>cryptoflex Module<a class="headerlink" href="#cryptoflex-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -1519,7 +1519,7 @@ contain a data to sign (tag 0x9A, 0xAC or 0xBC) and a digital signature
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ePass Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>ePass Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="epass-module">
|
||||
<h1>ePass Module<a class="headerlink" href="#epass-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -818,7 +818,7 @@ contain a data to sign (tag 0x9A, 0xAC or 0xBC) and a digital signature
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>cards Package — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>cards Package — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,15 +123,12 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="cards-package">
|
||||
<h1>cards Package<a class="headerlink" href="#cards-package" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.cards.HandlerTest.html">HandlerTest Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.cards.Relay.html">Relay Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.cards.RelayMiddleman.html">RelayMiddleman Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.cards.cryptoflex.html">cryptoflex Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.cards.ePass.html">ePass Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.cards.nPA.html">nPA Module</a></li>
|
||||
@@ -151,7 +148,7 @@
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>nPA Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>nPA Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="npa-module">
|
||||
<h1>nPA Module<a class="headerlink" href="#npa-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>virtualsmartcard Package — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>virtualsmartcard Package — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,28 +123,18 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="virtualsmartcard-package">
|
||||
<h1>virtualsmartcard Package<a class="headerlink" href="#virtualsmartcard-package" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.cards.html">cards Package</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.cards.HandlerTest.html">HandlerTest Module</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.cards.Relay.html">Relay Module</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.cards.RelayMiddleman.html">RelayMiddleman Module</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.cards.cryptoflex.html">cryptoflex Module</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.cards.ePass.html">ePass Module</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.cards.nPA.html">nPA Module</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.tests.html">tests Package</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.tests.CardGenerator_test.html">CardGenerator_test Module</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.tests.CryptoUtils_test.html">CryptoUtils_test Module</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.tests.SmartcardSAM_test.html">SmartcardSAM_test Module</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="virtualsmartcard.tests.utils_test.html">utils_test Module</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.CardGenerator.html">CardGenerator Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.ConstantDefinitions.html">ConstantDefinitions Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.CryptoUtils.html">CryptoUtils Module</a></li>
|
||||
@@ -171,7 +161,7 @@
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,843 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>CryptoUtils_test Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
</head><body>
|
||||
|
||||
<a href="https://github.com/frankmorgner/vsmartcard"
|
||||
class="visible-desktop hidden-xs"><img
|
||||
id="gh-banner"
|
||||
style="position: absolute; top: 50px; right: 0; border: 0;"
|
||||
src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"
|
||||
alt="Fork me on GitHub"></a>
|
||||
<script>
|
||||
// Adjust banner height.
|
||||
$(function () {
|
||||
var navHeight = $(".navbar .container").css("height");
|
||||
$("#gh-banner").css("top", navHeight);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="navbar" class="navbar navbar-default ">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../index.html">
|
||||
vsmartcard</a>
|
||||
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse nav-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
|
||||
<li class="dropdown globaltoc-container">
|
||||
<a role="button"
|
||||
id="dLabelGlobalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="../../index.html">Site <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu globaltoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelGlobalToc"><ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../README.html">Virtual Smart Card</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../remote-reader/README.html">Remote Smart Card Reader</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ACardEmulator/README.html">Android Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../TCardEmulator/README.html">Tizen Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../pcsc-relay/README.html">PC/SC Relay</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ccid/README.html">USB CCID Emulator</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api.html">Creating a Virtual Smart Card</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a role="button"
|
||||
id="dLabelLocalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="#">Page <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu localtoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelLocalToc"><ul>
|
||||
<li><a class="reference internal" href="#">CryptoUtils_test Module</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="hidden-sm"></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<form class="navbar-form navbar-right" action="../../search.html" method="get">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search" />
|
||||
</div>
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
|
||||
<div class="section" id="cryptoutils-test-module">
|
||||
<h1>CryptoUtils_test Module<a class="headerlink" href="#cryptoutils-test-module" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="graphviz"><img src="../../_images/inheritance-c95de3c82405e783e52102c0d9ccbc16f7e48d7c.png" alt="Inheritance diagram of virtualsmartcard.tests.CryptoUtils_test" usemap="#inheritance34477d81d3" class="inheritance graphviz" /></div>
|
||||
<map id="inheritance34477d81d3" name="inheritance34477d81d3">
|
||||
<area shape="rect" id="node2" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils" target="_top" title="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils" alt="" coords="221,5,600,31"/>
|
||||
</map><span class="target" id="module-virtualsmartcard.tests.CryptoUtils_test"></span><dl class="py class">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.tests.CryptoUtils_test.</span></code><code class="sig-name descname"><span class="pre">TestCryptoUtils</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">methodName</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'runTest'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">unittest.case.TestCase</span></code></p>
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._addExpectedFailure">
|
||||
<code class="sig-name descname"><span class="pre">_addExpectedFailure</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exc_info</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._addExpectedFailure" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._addSkip">
|
||||
<code class="sig-name descname"><span class="pre">_addSkip</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">test_case</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reason</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._addSkip" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._addUnexpectedSuccess">
|
||||
<code class="sig-name descname"><span class="pre">_addUnexpectedSuccess</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._addUnexpectedSuccess" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._baseAssertEqual">
|
||||
<code class="sig-name descname"><span class="pre">_baseAssertEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._baseAssertEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The default assertEqual implementation, not type specific.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._callCleanup">
|
||||
<code class="sig-name descname"><span class="pre">_callCleanup</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._callCleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._callSetUp">
|
||||
<code class="sig-name descname"><span class="pre">_callSetUp</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._callSetUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._callTearDown">
|
||||
<code class="sig-name descname"><span class="pre">_callTearDown</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._callTearDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._callTestMethod">
|
||||
<code class="sig-name descname"><span class="pre">_callTestMethod</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">method</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._callTestMethod" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._classSetupFailed">
|
||||
<code class="sig-name descname"><span class="pre">_classSetupFailed</span></code><em class="property"> <span class="pre">=</span> <span class="pre">False</span></em><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._classSetupFailed" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._class_cleanups">
|
||||
<code class="sig-name descname"><span class="pre">_class_cleanups</span></code><em class="property"> <span class="pre">=</span> <span class="pre">[]</span></em><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._class_cleanups" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._deprecate">
|
||||
<code class="sig-name descname"><span class="pre">_deprecate</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._deprecate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._diffThreshold">
|
||||
<code class="sig-name descname"><span class="pre">_diffThreshold</span></code><em class="property"> <span class="pre">=</span> <span class="pre">65536</span></em><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._diffThreshold" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._feedErrorsToResult">
|
||||
<code class="sig-name descname"><span class="pre">_feedErrorsToResult</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">errors</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._feedErrorsToResult" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._formatMessage">
|
||||
<code class="sig-name descname"><span class="pre">_formatMessage</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">standardMsg</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._formatMessage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Honour the longMessage attribute when generating failure messages.
|
||||
If longMessage is False this means:
|
||||
* Use only an explicit message if it is provided
|
||||
* Otherwise use the standard message for the assert</p>
|
||||
<p>If longMessage is True:
|
||||
* Use the standard message
|
||||
* If an explicit message is provided, plus ‘ : ‘ and the explicit message</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._getAssertEqualityFunc">
|
||||
<code class="sig-name descname"><span class="pre">_getAssertEqualityFunc</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._getAssertEqualityFunc" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get a detailed comparison function for the types of the two args.</p>
|
||||
<p>Returns: A callable accepting (first, second, msg=None) that will
|
||||
raise a failure exception if first != second with a useful human
|
||||
readable error message for those types.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._truncateMessage">
|
||||
<code class="sig-name descname"><span class="pre">_truncateMessage</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">diff</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._truncateMessage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addClassCleanup">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">addClassCleanup</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addClassCleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Same as addCleanup, except the cleanup items are called even if
|
||||
setUpClass fails (unlike tearDownClass).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addCleanup">
|
||||
<code class="sig-name descname"><span class="pre">addCleanup</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addCleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add a function, with arguments, to be called when the test is
|
||||
completed. Functions added are called on a LIFO basis and are
|
||||
called after tearDown on test failure or success.</p>
|
||||
<p>Cleanup items are called even if setUp fails (unlike tearDown).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addTypeEqualityFunc">
|
||||
<code class="sig-name descname"><span class="pre">addTypeEqualityFunc</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">typeobj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addTypeEqualityFunc" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add a type specific assertEqual style function to compare a type.</p>
|
||||
<p>This method is for use by TestCase subclasses that need to register
|
||||
their own type equality functions to provide nicer error messages.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>typeobj: The data type to call this function on when both values</dt><dd><p>are of the same type in assertEqual().</p>
|
||||
</dd>
|
||||
<dt>function: The callable taking two arguments and an optional</dt><dd><p>msg= argument that raises self.failureException with a
|
||||
useful error message when the two arguments are not equal.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">places</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are unequal as determined by their
|
||||
difference rounded to the given number of decimal places
|
||||
(default 7) and comparing to zero, or by comparing that the
|
||||
difference between the two objects is more than the given
|
||||
delta.</p>
|
||||
<p>Note that decimal places (from zero) are usually not the same
|
||||
as significant digits (measured from the most significant digit).</p>
|
||||
<p>If the two objects compare equal then they will automatically
|
||||
compare almost equal.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertAlmostEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertAlmostEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertAlmostEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertCountEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertCountEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertCountEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Asserts that two iterables have the same elements, the same number of
|
||||
times, without regard to order.</p>
|
||||
<blockquote>
|
||||
<div><blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>self.assertEqual(Counter(list(first)),</dt><dd><p>Counter(list(second)))</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>Example:</dt><dd><ul class="simple">
|
||||
<li><p>[0, 1, 1] and [1, 0, 1] compare equal.</p></li>
|
||||
<li><p>[0, 0, 1] and [0, 1] compare unequal.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertDictContainsSubset">
|
||||
<code class="sig-name descname"><span class="pre">assertDictContainsSubset</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">subset</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dictionary</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertDictContainsSubset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks whether dictionary is a superset of subset.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertDictEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertDictEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">d1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">d2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertDictEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are unequal as determined by the ‘==’
|
||||
operator.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertFalse">
|
||||
<code class="sig-name descname"><span class="pre">assertFalse</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertFalse" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Check that the expression is false.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertGreater">
|
||||
<code class="sig-name descname"><span class="pre">assertGreater</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertGreater" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a > b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertGreaterEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertGreaterEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertGreaterEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a >= b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIn">
|
||||
<code class="sig-name descname"><span class="pre">assertIn</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">member</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">container</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIn" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a in b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIs">
|
||||
<code class="sig-name descname"><span class="pre">assertIs</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expr2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIs" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a is b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsInstance">
|
||||
<code class="sig-name descname"><span class="pre">assertIsInstance</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cls</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsInstance" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Same as self.assertTrue(isinstance(obj, cls)), with a nicer
|
||||
default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNone">
|
||||
<code class="sig-name descname"><span class="pre">assertIsNone</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNone" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Same as self.assertTrue(obj is None), with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNot">
|
||||
<code class="sig-name descname"><span class="pre">assertIsNot</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expr2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNot" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a is not b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNotNone">
|
||||
<code class="sig-name descname"><span class="pre">assertIsNotNone</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNotNone" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Included for symmetry with assertIsNone.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLess">
|
||||
<code class="sig-name descname"><span class="pre">assertLess</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLess" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a < b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLessEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertLessEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLessEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a <= b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertListEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertListEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">list1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">list2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertListEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A list-specific equality assertion.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>list1: The first list to compare.
|
||||
list2: The second list to compare.
|
||||
msg: Optional message to use on failure instead of a list of</p>
|
||||
<blockquote>
|
||||
<div><p>differences.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLogs">
|
||||
<code class="sig-name descname"><span class="pre">assertLogs</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">logger</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">level</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLogs" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail unless a log message of level <em>level</em> or higher is emitted
|
||||
on <em>logger_name</em> or its children. If omitted, <em>level</em> defaults to
|
||||
INFO and <em>logger</em> defaults to the root logger.</p>
|
||||
<p>This method must be used as a context manager, and will yield
|
||||
a recording object with two attributes: <cite>output</cite> and <cite>records</cite>.
|
||||
At the end of the context manager, the <cite>output</cite> attribute will
|
||||
be a list of the matching formatted log messages and the
|
||||
<cite>records</cite> attribute will be a list of the corresponding LogRecord
|
||||
objects.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertLogs</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">,</span> <span class="n">level</span><span class="o">=</span><span class="s1">'INFO'</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">)</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s1">'first message'</span><span class="p">)</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s1">'foo.bar'</span><span class="p">)</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s1">'second message'</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">cm</span><span class="o">.</span><span class="n">output</span><span class="p">,</span> <span class="p">[</span><span class="s1">'INFO:foo:first message'</span><span class="p">,</span>
|
||||
<span class="s1">'ERROR:foo.bar:second message'</span><span class="p">])</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertMultiLineEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertMultiLineEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertMultiLineEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Assert that two multi-line strings are equal.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertNotAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">places</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are equal as determined by their
|
||||
difference rounded to the given number of decimal places
|
||||
(default 7) and comparing to zero, or by comparing that the
|
||||
difference between the two objects is less than the given delta.</p>
|
||||
<p>Note that decimal places (from zero) are usually not the same
|
||||
as significant digits (measured from the most significant digit).</p>
|
||||
<p>Objects that are equal automatically fail.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotAlmostEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertNotAlmostEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotAlmostEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertNotEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are equal as determined by the ‘!=’
|
||||
operator.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertNotEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotIn">
|
||||
<code class="sig-name descname"><span class="pre">assertNotIn</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">member</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">container</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotIn" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a not in b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotIsInstance">
|
||||
<code class="sig-name descname"><span class="pre">assertNotIsInstance</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cls</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotIsInstance" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Included for symmetry with assertIsInstance.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertNotRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unexpected_regex</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail the test if the text matches the regular expression.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotRegexpMatches">
|
||||
<code class="sig-name descname"><span class="pre">assertNotRegexpMatches</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotRegexpMatches" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaises">
|
||||
<code class="sig-name descname"><span class="pre">assertRaises</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_exception</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaises" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail unless an exception of class expected_exception is raised
|
||||
by the callable when invoked with specified positional and
|
||||
keyword arguments. If a different type of exception is
|
||||
raised, it will not be caught, and the test case will be
|
||||
deemed to have suffered an error, exactly as for an
|
||||
unexpected exception.</p>
|
||||
<p>If called with the callable and arguments omitted, will return a
|
||||
context object used like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">):</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>An optional keyword argument ‘msg’ can be provided when assertRaises
|
||||
is used as a context object.</p>
|
||||
<p>The context manager keeps a reference to the exception as
|
||||
the ‘exception’ attribute. This allows you to inspect the
|
||||
exception after the assertion:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
<span class="n">the_exception</span> <span class="o">=</span> <span class="n">cm</span><span class="o">.</span><span class="n">exception</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">the_exception</span><span class="o">.</span><span class="n">error_code</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaisesRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertRaisesRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_exception</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_regex</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaisesRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Asserts that the message in a raised exception matches a regex.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>expected_exception: Exception class expected to be raised.
|
||||
expected_regex: Regex (re.Pattern object or string) expected</p>
|
||||
<blockquote>
|
||||
<div><p>to be found in error message.</p>
|
||||
</div></blockquote>
|
||||
<p>args: Function to be called and extra positional args.
|
||||
kwargs: Extra kwargs.
|
||||
msg: Optional message used in case of failure. Can only be used</p>
|
||||
<blockquote>
|
||||
<div><p>when assertRaisesRegex is used as a context manager.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaisesRegexp">
|
||||
<code class="sig-name descname"><span class="pre">assertRaisesRegexp</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaisesRegexp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_regex</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail the test unless the text matches the regular expression.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRegexpMatches">
|
||||
<code class="sig-name descname"><span class="pre">assertRegexpMatches</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRegexpMatches" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertSequenceEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertSequenceEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">seq1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">seq2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">seq_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertSequenceEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>An equality assertion for ordered sequences (like lists and tuples).</p>
|
||||
<p>For the purposes of this function, a valid ordered sequence type is one
|
||||
which can be indexed, has a length, and has an equality operator.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>seq1: The first sequence to compare.
|
||||
seq2: The second sequence to compare.
|
||||
seq_type: The expected datatype of the sequences, or None if no</p>
|
||||
<blockquote>
|
||||
<div><p>datatype should be enforced.</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>msg: Optional message to use on failure instead of a list of</dt><dd><p>differences.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertSetEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertSetEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">set1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">set2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertSetEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A set-specific equality assertion.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>set1: The first set to compare.
|
||||
set2: The second set to compare.
|
||||
msg: Optional message to use on failure instead of a list of</p>
|
||||
<blockquote>
|
||||
<div><p>differences.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>assertSetEqual uses ducktyping to support different types of sets, and
|
||||
is optimized for sets specifically (parameters must support a
|
||||
difference method).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertTrue">
|
||||
<code class="sig-name descname"><span class="pre">assertTrue</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertTrue" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Check that the expression is true.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertTupleEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertTupleEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tuple1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tuple2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertTupleEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A tuple-specific equality assertion.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>tuple1: The first tuple to compare.
|
||||
tuple2: The second tuple to compare.
|
||||
msg: Optional message to use on failure instead of a list of</p>
|
||||
<blockquote>
|
||||
<div><p>differences.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertWarns">
|
||||
<code class="sig-name descname"><span class="pre">assertWarns</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_warning</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertWarns" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail unless a warning of class warnClass is triggered
|
||||
by the callable when invoked with specified positional and
|
||||
keyword arguments. If a different type of warning is
|
||||
triggered, it will not be handled: depending on the other
|
||||
warning filtering rules in effect, it might be silenced, printed
|
||||
out, or raised as an exception.</p>
|
||||
<p>If called with the callable and arguments omitted, will return a
|
||||
context object used like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertWarns</span><span class="p">(</span><span class="n">SomeWarning</span><span class="p">):</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>An optional keyword argument ‘msg’ can be provided when assertWarns
|
||||
is used as a context object.</p>
|
||||
<p>The context manager keeps a reference to the first matching
|
||||
warning as the ‘warning’ attribute; similarly, the ‘filename’
|
||||
and ‘lineno’ attributes give you information about the line
|
||||
of Python code from which the warning was triggered.
|
||||
This allows you to inspect the warning after the assertion:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertWarns</span><span class="p">(</span><span class="n">SomeWarning</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
<span class="n">the_warning</span> <span class="o">=</span> <span class="n">cm</span><span class="o">.</span><span class="n">warning</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">the_warning</span><span class="o">.</span><span class="n">some_attribute</span><span class="p">,</span> <span class="mi">147</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertWarnsRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertWarnsRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_warning</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_regex</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertWarnsRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Asserts that the message in a triggered warning matches a regexp.
|
||||
Basic functioning is similar to assertWarns() with the addition
|
||||
that only warnings whose messages also match the regular expression
|
||||
are considered successful matches.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>expected_warning: Warning class expected to be triggered.
|
||||
expected_regex: Regex (re.Pattern object or string) expected</p>
|
||||
<blockquote>
|
||||
<div><p>to be found in error message.</p>
|
||||
</div></blockquote>
|
||||
<p>args: Function to be called and extra positional args.
|
||||
kwargs: Extra kwargs.
|
||||
msg: Optional message used in case of failure. Can only be used</p>
|
||||
<blockquote>
|
||||
<div><p>when assertWarnsRegex is used as a context manager.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assert_">
|
||||
<code class="sig-name descname"><span class="pre">assert_</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assert_" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.countTestCases">
|
||||
<code class="sig-name descname"><span class="pre">countTestCases</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.countTestCases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.debug">
|
||||
<code class="sig-name descname"><span class="pre">debug</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.debug" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Run the test without collecting errors in a TestResult</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.defaultTestResult">
|
||||
<code class="sig-name descname"><span class="pre">defaultTestResult</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.defaultTestResult" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.doClassCleanups">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">doClassCleanups</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.doClassCleanups" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Execute all class cleanup functions. Normally called for you after
|
||||
tearDownClass.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.doCleanups">
|
||||
<code class="sig-name descname"><span class="pre">doCleanups</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.doCleanups" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Execute all cleanup functions. Normally called for you after
|
||||
tearDown.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.fail">
|
||||
<code class="sig-name descname"><span class="pre">fail</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.fail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail immediately, with the given message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIf">
|
||||
<code class="sig-name descname"><span class="pre">failIf</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIf" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIfAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">failIfAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIfAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIfEqual">
|
||||
<code class="sig-name descname"><span class="pre">failIfEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIfEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnless">
|
||||
<code class="sig-name descname"><span class="pre">failUnless</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnless" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">failUnlessAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessEqual">
|
||||
<code class="sig-name descname"><span class="pre">failUnlessEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessRaises">
|
||||
<code class="sig-name descname"><span class="pre">failUnlessRaises</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessRaises" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failureException">
|
||||
<code class="sig-name descname"><span class="pre">failureException</span></code><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failureException" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">AssertionError</span></code></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.id">
|
||||
<code class="sig-name descname"><span class="pre">id</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.id" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.longMessage">
|
||||
<code class="sig-name descname"><span class="pre">longMessage</span></code><em class="property"> <span class="pre">=</span> <span class="pre">True</span></em><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.longMessage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.maxDiff">
|
||||
<code class="sig-name descname"><span class="pre">maxDiff</span></code><em class="property"> <span class="pre">=</span> <span class="pre">640</span></em><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.maxDiff" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.run">
|
||||
<code class="sig-name descname"><span class="pre">run</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.run" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.setUp">
|
||||
<code class="sig-name descname"><span class="pre">setUp</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.setUpClass">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">setUpClass</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.setUpClass" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up class fixture before running tests in the class.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.shortDescription">
|
||||
<code class="sig-name descname"><span class="pre">shortDescription</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.shortDescription" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a one-line description of the test, or None if no
|
||||
description has been provided.</p>
|
||||
<p>The default implementation of this method returns the first line of
|
||||
the specified test method’s docstring.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.skipTest">
|
||||
<code class="sig-name descname"><span class="pre">skipTest</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">reason</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.skipTest" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Skip this test.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.subTest">
|
||||
<code class="sig-name descname"><span class="pre">subTest</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">msg=<object</span> <span class="pre">object></span></em>, <em class="sig-param"><span class="pre">**params</span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.subTest" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return a context manager that will return the enclosed block
|
||||
of code in a subtest identified by the optional message and
|
||||
keyword parameters. A failure in the subtest marks the test
|
||||
case as failed but resumes execution at the end of the enclosed
|
||||
block, allowing further test code to be executed.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.tearDown">
|
||||
<code class="sig-name descname"><span class="pre">tearDown</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.tearDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.tearDownClass">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">tearDownClass</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.tearDownClass" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for deconstructing the class fixture after running all tests in the class.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.test_padding">
|
||||
<code class="sig-name descname"><span class="pre">test_padding</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.test_padding" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="pull-right">
|
||||
<a href="#">Back to top</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,863 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SmartcardSAM_test Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
</head><body>
|
||||
|
||||
<a href="https://github.com/frankmorgner/vsmartcard"
|
||||
class="visible-desktop hidden-xs"><img
|
||||
id="gh-banner"
|
||||
style="position: absolute; top: 50px; right: 0; border: 0;"
|
||||
src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"
|
||||
alt="Fork me on GitHub"></a>
|
||||
<script>
|
||||
// Adjust banner height.
|
||||
$(function () {
|
||||
var navHeight = $(".navbar .container").css("height");
|
||||
$("#gh-banner").css("top", navHeight);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="navbar" class="navbar navbar-default ">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../index.html">
|
||||
vsmartcard</a>
|
||||
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse nav-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
|
||||
<li class="dropdown globaltoc-container">
|
||||
<a role="button"
|
||||
id="dLabelGlobalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="../../index.html">Site <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu globaltoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelGlobalToc"><ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../README.html">Virtual Smart Card</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../remote-reader/README.html">Remote Smart Card Reader</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ACardEmulator/README.html">Android Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../TCardEmulator/README.html">Tizen Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../pcsc-relay/README.html">PC/SC Relay</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ccid/README.html">USB CCID Emulator</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api.html">Creating a Virtual Smart Card</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a role="button"
|
||||
id="dLabelLocalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="#">Page <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu localtoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelLocalToc"><ul>
|
||||
<li><a class="reference internal" href="#">SmartcardSAM_test Module</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="hidden-sm"></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<form class="navbar-form navbar-right" action="../../search.html" method="get">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search" />
|
||||
</div>
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
|
||||
<div class="section" id="smartcardsam-test-module">
|
||||
<h1>SmartcardSAM_test Module<a class="headerlink" href="#smartcardsam-test-module" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="graphviz"><img src="../../_images/inheritance-285e17a8f890c78c473daa9db430b4cda74f6cb7.png" alt="Inheritance diagram of virtualsmartcard.tests.SmartcardSAM_test" usemap="#inheritance91c24ce5a0" class="inheritance graphviz" /></div>
|
||||
<map id="inheritance91c24ce5a0" name="inheritance91c24ce5a0">
|
||||
<area shape="rect" id="node2" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM" target="_top" title="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM" alt="" coords="221,5,648,31"/>
|
||||
</map><span class="target" id="module-virtualsmartcard.tests.SmartcardSAM_test"></span><dl class="py class">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.tests.SmartcardSAM_test.</span></code><code class="sig-name descname"><span class="pre">TestSmartcardSAM</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">methodName</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'runTest'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">unittest.case.TestCase</span></code></p>
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._addExpectedFailure">
|
||||
<code class="sig-name descname"><span class="pre">_addExpectedFailure</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exc_info</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._addExpectedFailure" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._addSkip">
|
||||
<code class="sig-name descname"><span class="pre">_addSkip</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">test_case</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reason</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._addSkip" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._addUnexpectedSuccess">
|
||||
<code class="sig-name descname"><span class="pre">_addUnexpectedSuccess</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._addUnexpectedSuccess" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._baseAssertEqual">
|
||||
<code class="sig-name descname"><span class="pre">_baseAssertEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._baseAssertEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The default assertEqual implementation, not type specific.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._callCleanup">
|
||||
<code class="sig-name descname"><span class="pre">_callCleanup</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._callCleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._callSetUp">
|
||||
<code class="sig-name descname"><span class="pre">_callSetUp</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._callSetUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._callTearDown">
|
||||
<code class="sig-name descname"><span class="pre">_callTearDown</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._callTearDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._callTestMethod">
|
||||
<code class="sig-name descname"><span class="pre">_callTestMethod</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">method</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._callTestMethod" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._classSetupFailed">
|
||||
<code class="sig-name descname"><span class="pre">_classSetupFailed</span></code><em class="property"> <span class="pre">=</span> <span class="pre">False</span></em><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._classSetupFailed" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._class_cleanups">
|
||||
<code class="sig-name descname"><span class="pre">_class_cleanups</span></code><em class="property"> <span class="pre">=</span> <span class="pre">[]</span></em><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._class_cleanups" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._deprecate">
|
||||
<code class="sig-name descname"><span class="pre">_deprecate</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._deprecate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._diffThreshold">
|
||||
<code class="sig-name descname"><span class="pre">_diffThreshold</span></code><em class="property"> <span class="pre">=</span> <span class="pre">65536</span></em><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._diffThreshold" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._feedErrorsToResult">
|
||||
<code class="sig-name descname"><span class="pre">_feedErrorsToResult</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">errors</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._feedErrorsToResult" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._formatMessage">
|
||||
<code class="sig-name descname"><span class="pre">_formatMessage</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">standardMsg</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._formatMessage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Honour the longMessage attribute when generating failure messages.
|
||||
If longMessage is False this means:
|
||||
* Use only an explicit message if it is provided
|
||||
* Otherwise use the standard message for the assert</p>
|
||||
<p>If longMessage is True:
|
||||
* Use the standard message
|
||||
* If an explicit message is provided, plus ‘ : ‘ and the explicit message</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._getAssertEqualityFunc">
|
||||
<code class="sig-name descname"><span class="pre">_getAssertEqualityFunc</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._getAssertEqualityFunc" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get a detailed comparison function for the types of the two args.</p>
|
||||
<p>Returns: A callable accepting (first, second, msg=None) that will
|
||||
raise a failure exception if first != second with a useful human
|
||||
readable error message for those types.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._truncateMessage">
|
||||
<code class="sig-name descname"><span class="pre">_truncateMessage</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">diff</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM._truncateMessage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.addClassCleanup">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">addClassCleanup</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.addClassCleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Same as addCleanup, except the cleanup items are called even if
|
||||
setUpClass fails (unlike tearDownClass).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.addCleanup">
|
||||
<code class="sig-name descname"><span class="pre">addCleanup</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.addCleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add a function, with arguments, to be called when the test is
|
||||
completed. Functions added are called on a LIFO basis and are
|
||||
called after tearDown on test failure or success.</p>
|
||||
<p>Cleanup items are called even if setUp fails (unlike tearDown).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.addTypeEqualityFunc">
|
||||
<code class="sig-name descname"><span class="pre">addTypeEqualityFunc</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">typeobj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.addTypeEqualityFunc" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add a type specific assertEqual style function to compare a type.</p>
|
||||
<p>This method is for use by TestCase subclasses that need to register
|
||||
their own type equality functions to provide nicer error messages.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>typeobj: The data type to call this function on when both values</dt><dd><p>are of the same type in assertEqual().</p>
|
||||
</dd>
|
||||
<dt>function: The callable taking two arguments and an optional</dt><dd><p>msg= argument that raises self.failureException with a
|
||||
useful error message when the two arguments are not equal.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">places</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are unequal as determined by their
|
||||
difference rounded to the given number of decimal places
|
||||
(default 7) and comparing to zero, or by comparing that the
|
||||
difference between the two objects is more than the given
|
||||
delta.</p>
|
||||
<p>Note that decimal places (from zero) are usually not the same
|
||||
as significant digits (measured from the most significant digit).</p>
|
||||
<p>If the two objects compare equal then they will automatically
|
||||
compare almost equal.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertAlmostEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertAlmostEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertAlmostEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertCountEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertCountEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertCountEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Asserts that two iterables have the same elements, the same number of
|
||||
times, without regard to order.</p>
|
||||
<blockquote>
|
||||
<div><blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>self.assertEqual(Counter(list(first)),</dt><dd><p>Counter(list(second)))</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>Example:</dt><dd><ul class="simple">
|
||||
<li><p>[0, 1, 1] and [1, 0, 1] compare equal.</p></li>
|
||||
<li><p>[0, 0, 1] and [0, 1] compare unequal.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertDictContainsSubset">
|
||||
<code class="sig-name descname"><span class="pre">assertDictContainsSubset</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">subset</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dictionary</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertDictContainsSubset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks whether dictionary is a superset of subset.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertDictEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertDictEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">d1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">d2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertDictEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are unequal as determined by the ‘==’
|
||||
operator.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertFalse">
|
||||
<code class="sig-name descname"><span class="pre">assertFalse</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertFalse" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Check that the expression is false.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertGreater">
|
||||
<code class="sig-name descname"><span class="pre">assertGreater</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertGreater" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a > b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertGreaterEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertGreaterEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertGreaterEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a >= b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIn">
|
||||
<code class="sig-name descname"><span class="pre">assertIn</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">member</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">container</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIn" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a in b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIs">
|
||||
<code class="sig-name descname"><span class="pre">assertIs</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expr2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIs" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a is b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIsInstance">
|
||||
<code class="sig-name descname"><span class="pre">assertIsInstance</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cls</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIsInstance" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Same as self.assertTrue(isinstance(obj, cls)), with a nicer
|
||||
default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIsNone">
|
||||
<code class="sig-name descname"><span class="pre">assertIsNone</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIsNone" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Same as self.assertTrue(obj is None), with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIsNot">
|
||||
<code class="sig-name descname"><span class="pre">assertIsNot</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expr2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIsNot" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a is not b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIsNotNone">
|
||||
<code class="sig-name descname"><span class="pre">assertIsNotNone</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertIsNotNone" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Included for symmetry with assertIsNone.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertLess">
|
||||
<code class="sig-name descname"><span class="pre">assertLess</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertLess" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a < b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertLessEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertLessEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertLessEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a <= b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertListEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertListEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">list1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">list2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertListEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A list-specific equality assertion.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>list1: The first list to compare.
|
||||
list2: The second list to compare.
|
||||
msg: Optional message to use on failure instead of a list of</p>
|
||||
<blockquote>
|
||||
<div><p>differences.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertLogs">
|
||||
<code class="sig-name descname"><span class="pre">assertLogs</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">logger</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">level</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertLogs" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail unless a log message of level <em>level</em> or higher is emitted
|
||||
on <em>logger_name</em> or its children. If omitted, <em>level</em> defaults to
|
||||
INFO and <em>logger</em> defaults to the root logger.</p>
|
||||
<p>This method must be used as a context manager, and will yield
|
||||
a recording object with two attributes: <cite>output</cite> and <cite>records</cite>.
|
||||
At the end of the context manager, the <cite>output</cite> attribute will
|
||||
be a list of the matching formatted log messages and the
|
||||
<cite>records</cite> attribute will be a list of the corresponding LogRecord
|
||||
objects.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertLogs</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">,</span> <span class="n">level</span><span class="o">=</span><span class="s1">'INFO'</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">)</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s1">'first message'</span><span class="p">)</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s1">'foo.bar'</span><span class="p">)</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s1">'second message'</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">cm</span><span class="o">.</span><span class="n">output</span><span class="p">,</span> <span class="p">[</span><span class="s1">'INFO:foo:first message'</span><span class="p">,</span>
|
||||
<span class="s1">'ERROR:foo.bar:second message'</span><span class="p">])</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertMultiLineEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertMultiLineEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertMultiLineEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Assert that two multi-line strings are equal.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertNotAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">places</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are equal as determined by their
|
||||
difference rounded to the given number of decimal places
|
||||
(default 7) and comparing to zero, or by comparing that the
|
||||
difference between the two objects is less than the given delta.</p>
|
||||
<p>Note that decimal places (from zero) are usually not the same
|
||||
as significant digits (measured from the most significant digit).</p>
|
||||
<p>Objects that are equal automatically fail.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotAlmostEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertNotAlmostEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotAlmostEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertNotEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are equal as determined by the ‘!=’
|
||||
operator.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertNotEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotIn">
|
||||
<code class="sig-name descname"><span class="pre">assertNotIn</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">member</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">container</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotIn" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a not in b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotIsInstance">
|
||||
<code class="sig-name descname"><span class="pre">assertNotIsInstance</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cls</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotIsInstance" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Included for symmetry with assertIsInstance.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertNotRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unexpected_regex</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail the test if the text matches the regular expression.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotRegexpMatches">
|
||||
<code class="sig-name descname"><span class="pre">assertNotRegexpMatches</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertNotRegexpMatches" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRaises">
|
||||
<code class="sig-name descname"><span class="pre">assertRaises</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_exception</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRaises" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail unless an exception of class expected_exception is raised
|
||||
by the callable when invoked with specified positional and
|
||||
keyword arguments. If a different type of exception is
|
||||
raised, it will not be caught, and the test case will be
|
||||
deemed to have suffered an error, exactly as for an
|
||||
unexpected exception.</p>
|
||||
<p>If called with the callable and arguments omitted, will return a
|
||||
context object used like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">):</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>An optional keyword argument ‘msg’ can be provided when assertRaises
|
||||
is used as a context object.</p>
|
||||
<p>The context manager keeps a reference to the exception as
|
||||
the ‘exception’ attribute. This allows you to inspect the
|
||||
exception after the assertion:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
<span class="n">the_exception</span> <span class="o">=</span> <span class="n">cm</span><span class="o">.</span><span class="n">exception</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">the_exception</span><span class="o">.</span><span class="n">error_code</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRaisesRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertRaisesRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_exception</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_regex</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRaisesRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Asserts that the message in a raised exception matches a regex.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>expected_exception: Exception class expected to be raised.
|
||||
expected_regex: Regex (re.Pattern object or string) expected</p>
|
||||
<blockquote>
|
||||
<div><p>to be found in error message.</p>
|
||||
</div></blockquote>
|
||||
<p>args: Function to be called and extra positional args.
|
||||
kwargs: Extra kwargs.
|
||||
msg: Optional message used in case of failure. Can only be used</p>
|
||||
<blockquote>
|
||||
<div><p>when assertRaisesRegex is used as a context manager.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRaisesRegexp">
|
||||
<code class="sig-name descname"><span class="pre">assertRaisesRegexp</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRaisesRegexp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_regex</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail the test unless the text matches the regular expression.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRegexpMatches">
|
||||
<code class="sig-name descname"><span class="pre">assertRegexpMatches</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertRegexpMatches" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertSequenceEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertSequenceEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">seq1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">seq2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">seq_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertSequenceEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>An equality assertion for ordered sequences (like lists and tuples).</p>
|
||||
<p>For the purposes of this function, a valid ordered sequence type is one
|
||||
which can be indexed, has a length, and has an equality operator.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>seq1: The first sequence to compare.
|
||||
seq2: The second sequence to compare.
|
||||
seq_type: The expected datatype of the sequences, or None if no</p>
|
||||
<blockquote>
|
||||
<div><p>datatype should be enforced.</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>msg: Optional message to use on failure instead of a list of</dt><dd><p>differences.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertSetEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertSetEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">set1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">set2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertSetEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A set-specific equality assertion.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>set1: The first set to compare.
|
||||
set2: The second set to compare.
|
||||
msg: Optional message to use on failure instead of a list of</p>
|
||||
<blockquote>
|
||||
<div><p>differences.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>assertSetEqual uses ducktyping to support different types of sets, and
|
||||
is optimized for sets specifically (parameters must support a
|
||||
difference method).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertTrue">
|
||||
<code class="sig-name descname"><span class="pre">assertTrue</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertTrue" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Check that the expression is true.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertTupleEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertTupleEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tuple1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tuple2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertTupleEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A tuple-specific equality assertion.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>tuple1: The first tuple to compare.
|
||||
tuple2: The second tuple to compare.
|
||||
msg: Optional message to use on failure instead of a list of</p>
|
||||
<blockquote>
|
||||
<div><p>differences.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertWarns">
|
||||
<code class="sig-name descname"><span class="pre">assertWarns</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_warning</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertWarns" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail unless a warning of class warnClass is triggered
|
||||
by the callable when invoked with specified positional and
|
||||
keyword arguments. If a different type of warning is
|
||||
triggered, it will not be handled: depending on the other
|
||||
warning filtering rules in effect, it might be silenced, printed
|
||||
out, or raised as an exception.</p>
|
||||
<p>If called with the callable and arguments omitted, will return a
|
||||
context object used like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertWarns</span><span class="p">(</span><span class="n">SomeWarning</span><span class="p">):</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>An optional keyword argument ‘msg’ can be provided when assertWarns
|
||||
is used as a context object.</p>
|
||||
<p>The context manager keeps a reference to the first matching
|
||||
warning as the ‘warning’ attribute; similarly, the ‘filename’
|
||||
and ‘lineno’ attributes give you information about the line
|
||||
of Python code from which the warning was triggered.
|
||||
This allows you to inspect the warning after the assertion:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertWarns</span><span class="p">(</span><span class="n">SomeWarning</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
<span class="n">the_warning</span> <span class="o">=</span> <span class="n">cm</span><span class="o">.</span><span class="n">warning</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">the_warning</span><span class="o">.</span><span class="n">some_attribute</span><span class="p">,</span> <span class="mi">147</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertWarnsRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertWarnsRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_warning</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_regex</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assertWarnsRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Asserts that the message in a triggered warning matches a regexp.
|
||||
Basic functioning is similar to assertWarns() with the addition
|
||||
that only warnings whose messages also match the regular expression
|
||||
are considered successful matches.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>expected_warning: Warning class expected to be triggered.
|
||||
expected_regex: Regex (re.Pattern object or string) expected</p>
|
||||
<blockquote>
|
||||
<div><p>to be found in error message.</p>
|
||||
</div></blockquote>
|
||||
<p>args: Function to be called and extra positional args.
|
||||
kwargs: Extra kwargs.
|
||||
msg: Optional message used in case of failure. Can only be used</p>
|
||||
<blockquote>
|
||||
<div><p>when assertWarnsRegex is used as a context manager.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assert_">
|
||||
<code class="sig-name descname"><span class="pre">assert_</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.assert_" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.countTestCases">
|
||||
<code class="sig-name descname"><span class="pre">countTestCases</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.countTestCases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.debug">
|
||||
<code class="sig-name descname"><span class="pre">debug</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.debug" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Run the test without collecting errors in a TestResult</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.defaultTestResult">
|
||||
<code class="sig-name descname"><span class="pre">defaultTestResult</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.defaultTestResult" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.doClassCleanups">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">doClassCleanups</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.doClassCleanups" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Execute all class cleanup functions. Normally called for you after
|
||||
tearDownClass.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.doCleanups">
|
||||
<code class="sig-name descname"><span class="pre">doCleanups</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.doCleanups" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Execute all cleanup functions. Normally called for you after
|
||||
tearDown.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.fail">
|
||||
<code class="sig-name descname"><span class="pre">fail</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.fail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail immediately, with the given message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failIf">
|
||||
<code class="sig-name descname"><span class="pre">failIf</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failIf" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failIfAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">failIfAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failIfAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failIfEqual">
|
||||
<code class="sig-name descname"><span class="pre">failIfEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failIfEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failUnless">
|
||||
<code class="sig-name descname"><span class="pre">failUnless</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failUnless" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failUnlessAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">failUnlessAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failUnlessAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failUnlessEqual">
|
||||
<code class="sig-name descname"><span class="pre">failUnlessEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failUnlessEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failUnlessRaises">
|
||||
<code class="sig-name descname"><span class="pre">failUnlessRaises</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failUnlessRaises" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failureException">
|
||||
<code class="sig-name descname"><span class="pre">failureException</span></code><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.failureException" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">AssertionError</span></code></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.id">
|
||||
<code class="sig-name descname"><span class="pre">id</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.id" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.longMessage">
|
||||
<code class="sig-name descname"><span class="pre">longMessage</span></code><em class="property"> <span class="pre">=</span> <span class="pre">True</span></em><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.longMessage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.maxDiff">
|
||||
<code class="sig-name descname"><span class="pre">maxDiff</span></code><em class="property"> <span class="pre">=</span> <span class="pre">640</span></em><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.maxDiff" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.run">
|
||||
<code class="sig-name descname"><span class="pre">run</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.run" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.setUp">
|
||||
<code class="sig-name descname"><span class="pre">setUp</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.setUpClass">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">setUpClass</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.setUpClass" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up class fixture before running tests in the class.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.shortDescription">
|
||||
<code class="sig-name descname"><span class="pre">shortDescription</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.shortDescription" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a one-line description of the test, or None if no
|
||||
description has been provided.</p>
|
||||
<p>The default implementation of this method returns the first line of
|
||||
the specified test method’s docstring.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.skipTest">
|
||||
<code class="sig-name descname"><span class="pre">skipTest</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">reason</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.skipTest" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Skip this test.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.subTest">
|
||||
<code class="sig-name descname"><span class="pre">subTest</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">msg=<object</span> <span class="pre">object></span></em>, <em class="sig-param"><span class="pre">**params</span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.subTest" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return a context manager that will return the enclosed block
|
||||
of code in a subtest identified by the optional message and
|
||||
keyword parameters. A failure in the subtest marks the test
|
||||
case as failed but resumes execution at the end of the enclosed
|
||||
block, allowing further test code to be executed.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.tearDown">
|
||||
<code class="sig-name descname"><span class="pre">tearDown</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.tearDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.tearDownClass">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">tearDownClass</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.tearDownClass" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for deconstructing the class fixture after running all tests in the class.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_counter_decrement">
|
||||
<code class="sig-name descname"><span class="pre">test_counter_decrement</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_counter_decrement" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_external_authenticate">
|
||||
<code class="sig-name descname"><span class="pre">test_external_authenticate</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_external_authenticate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_incorrect_pin">
|
||||
<code class="sig-name descname"><span class="pre">test_incorrect_pin</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_incorrect_pin" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_internal_authenticate">
|
||||
<code class="sig-name descname"><span class="pre">test_internal_authenticate</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_internal_authenticate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_security_environment">
|
||||
<code class="sig-name descname"><span class="pre">test_security_environment</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.SmartcardSAM_test.TestSmartcardSAM.test_security_environment" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="pull-right">
|
||||
<a href="#">Back to top</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,157 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>tests Package — vsmartcard 2021-04-28 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
</head><body>
|
||||
|
||||
<a href="https://github.com/frankmorgner/vsmartcard"
|
||||
class="visible-desktop hidden-xs"><img
|
||||
id="gh-banner"
|
||||
style="position: absolute; top: 50px; right: 0; border: 0;"
|
||||
src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"
|
||||
alt="Fork me on GitHub"></a>
|
||||
<script>
|
||||
// Adjust banner height.
|
||||
$(function () {
|
||||
var navHeight = $(".navbar .container").css("height");
|
||||
$("#gh-banner").css("top", navHeight);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="navbar" class="navbar navbar-default ">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../index.html">
|
||||
vsmartcard</a>
|
||||
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse nav-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
|
||||
<li class="dropdown globaltoc-container">
|
||||
<a role="button"
|
||||
id="dLabelGlobalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="../../index.html">Site <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu globaltoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelGlobalToc"><ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../README.html">Virtual Smart Card</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../remote-reader/README.html">Remote Smart Card Reader</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ACardEmulator/README.html">Android Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../TCardEmulator/README.html">Tizen Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../pcsc-relay/README.html">PC/SC Relay</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ccid/README.html">USB CCID Emulator</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api.html">Creating a Virtual Smart Card</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a role="button"
|
||||
id="dLabelLocalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="#">Page <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu localtoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelLocalToc"><ul>
|
||||
<li><a class="reference internal" href="#">tests Package</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="hidden-sm"></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<form class="navbar-form navbar-right" action="../../search.html" method="get">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search" />
|
||||
</div>
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
|
||||
<div class="section" id="tests-package">
|
||||
<h1>tests Package<a class="headerlink" href="#tests-package" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.tests.CardGenerator_test.html">CardGenerator_test Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.tests.CryptoUtils_test.html">CryptoUtils_test Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.tests.SmartcardSAM_test.html">SmartcardSAM_test Module</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="virtualsmartcard.tests.utils_test.html">utils_test Module</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="pull-right">
|
||||
<a href="#">Back to top</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,848 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>utils_test Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
<script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
</head><body>
|
||||
|
||||
<a href="https://github.com/frankmorgner/vsmartcard"
|
||||
class="visible-desktop hidden-xs"><img
|
||||
id="gh-banner"
|
||||
style="position: absolute; top: 50px; right: 0; border: 0;"
|
||||
src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"
|
||||
alt="Fork me on GitHub"></a>
|
||||
<script>
|
||||
// Adjust banner height.
|
||||
$(function () {
|
||||
var navHeight = $(".navbar .container").css("height");
|
||||
$("#gh-banner").css("top", navHeight);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div id="navbar" class="navbar navbar-default ">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../index.html">
|
||||
vsmartcard</a>
|
||||
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse nav-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
|
||||
<li class="dropdown globaltoc-container">
|
||||
<a role="button"
|
||||
id="dLabelGlobalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="../../index.html">Site <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu globaltoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelGlobalToc"><ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../README.html">Virtual Smart Card</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../remote-reader/README.html">Remote Smart Card Reader</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ACardEmulator/README.html">Android Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../TCardEmulator/README.html">Tizen Smart Card Emulator</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../pcsc-relay/README.html">PC/SC Relay</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../ccid/README.html">USB CCID Emulator</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../api.html">Creating a Virtual Smart Card</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a role="button"
|
||||
id="dLabelLocalToc"
|
||||
data-toggle="dropdown"
|
||||
data-target="#"
|
||||
href="#">Page <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu localtoc"
|
||||
role="menu"
|
||||
aria-labelledby="dLabelLocalToc"><ul>
|
||||
<li><a class="reference internal" href="#">utils_test Module</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="hidden-sm"></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<form class="navbar-form navbar-right" action="../../search.html" method="get">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search" />
|
||||
</div>
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
|
||||
<div class="section" id="utils-test-module">
|
||||
<h1>utils_test Module<a class="headerlink" href="#utils-test-module" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="graphviz"><img src="../../_images/inheritance-5827e1a05433ba14df2d516741c83a340d46b696.png" alt="Inheritance diagram of virtualsmartcard.tests.utils_test" usemap="#inheritancedaa185e5f0" class="inheritance graphviz" /></div>
|
||||
<map id="inheritancedaa185e5f0" name="inheritancedaa185e5f0">
|
||||
<area shape="rect" id="node2" href="#virtualsmartcard.tests.utils_test.TestUtils" target="_top" title="virtualsmartcard.tests.utils_test.TestUtils" alt="" coords="221,5,512,31"/>
|
||||
</map><span class="target" id="module-virtualsmartcard.tests.utils_test"></span><dl class="py class">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils">
|
||||
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">virtualsmartcard.tests.utils_test.</span></code><code class="sig-name descname"><span class="pre">TestUtils</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">methodName</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'runTest'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">unittest.case.TestCase</span></code></p>
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._addExpectedFailure">
|
||||
<code class="sig-name descname"><span class="pre">_addExpectedFailure</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exc_info</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._addExpectedFailure" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._addSkip">
|
||||
<code class="sig-name descname"><span class="pre">_addSkip</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">test_case</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reason</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._addSkip" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._addUnexpectedSuccess">
|
||||
<code class="sig-name descname"><span class="pre">_addUnexpectedSuccess</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._addUnexpectedSuccess" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._baseAssertEqual">
|
||||
<code class="sig-name descname"><span class="pre">_baseAssertEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._baseAssertEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>The default assertEqual implementation, not type specific.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._callCleanup">
|
||||
<code class="sig-name descname"><span class="pre">_callCleanup</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._callCleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._callSetUp">
|
||||
<code class="sig-name descname"><span class="pre">_callSetUp</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._callSetUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._callTearDown">
|
||||
<code class="sig-name descname"><span class="pre">_callTearDown</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._callTearDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._callTestMethod">
|
||||
<code class="sig-name descname"><span class="pre">_callTestMethod</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">method</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._callTestMethod" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._classSetupFailed">
|
||||
<code class="sig-name descname"><span class="pre">_classSetupFailed</span></code><em class="property"> <span class="pre">=</span> <span class="pre">False</span></em><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._classSetupFailed" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._class_cleanups">
|
||||
<code class="sig-name descname"><span class="pre">_class_cleanups</span></code><em class="property"> <span class="pre">=</span> <span class="pre">[]</span></em><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._class_cleanups" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._deprecate">
|
||||
<code class="sig-name descname"><span class="pre">_deprecate</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._deprecate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._diffThreshold">
|
||||
<code class="sig-name descname"><span class="pre">_diffThreshold</span></code><em class="property"> <span class="pre">=</span> <span class="pre">65536</span></em><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._diffThreshold" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._feedErrorsToResult">
|
||||
<code class="sig-name descname"><span class="pre">_feedErrorsToResult</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">errors</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._feedErrorsToResult" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._formatMessage">
|
||||
<code class="sig-name descname"><span class="pre">_formatMessage</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">standardMsg</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._formatMessage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Honour the longMessage attribute when generating failure messages.
|
||||
If longMessage is False this means:
|
||||
* Use only an explicit message if it is provided
|
||||
* Otherwise use the standard message for the assert</p>
|
||||
<p>If longMessage is True:
|
||||
* Use the standard message
|
||||
* If an explicit message is provided, plus ‘ : ‘ and the explicit message</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._getAssertEqualityFunc">
|
||||
<code class="sig-name descname"><span class="pre">_getAssertEqualityFunc</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._getAssertEqualityFunc" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get a detailed comparison function for the types of the two args.</p>
|
||||
<p>Returns: A callable accepting (first, second, msg=None) that will
|
||||
raise a failure exception if first != second with a useful human
|
||||
readable error message for those types.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils._truncateMessage">
|
||||
<code class="sig-name descname"><span class="pre">_truncateMessage</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">diff</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils._truncateMessage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.addClassCleanup">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">addClassCleanup</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.addClassCleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Same as addCleanup, except the cleanup items are called even if
|
||||
setUpClass fails (unlike tearDownClass).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.addCleanup">
|
||||
<code class="sig-name descname"><span class="pre">addCleanup</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">/</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.addCleanup" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add a function, with arguments, to be called when the test is
|
||||
completed. Functions added are called on a LIFO basis and are
|
||||
called after tearDown on test failure or success.</p>
|
||||
<p>Cleanup items are called even if setUp fails (unlike tearDown).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.addTypeEqualityFunc">
|
||||
<code class="sig-name descname"><span class="pre">addTypeEqualityFunc</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">typeobj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">function</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.addTypeEqualityFunc" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Add a type specific assertEqual style function to compare a type.</p>
|
||||
<p>This method is for use by TestCase subclasses that need to register
|
||||
their own type equality functions to provide nicer error messages.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>typeobj: The data type to call this function on when both values</dt><dd><p>are of the same type in assertEqual().</p>
|
||||
</dd>
|
||||
<dt>function: The callable taking two arguments and an optional</dt><dd><p>msg= argument that raises self.failureException with a
|
||||
useful error message when the two arguments are not equal.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">places</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are unequal as determined by their
|
||||
difference rounded to the given number of decimal places
|
||||
(default 7) and comparing to zero, or by comparing that the
|
||||
difference between the two objects is more than the given
|
||||
delta.</p>
|
||||
<p>Note that decimal places (from zero) are usually not the same
|
||||
as significant digits (measured from the most significant digit).</p>
|
||||
<p>If the two objects compare equal then they will automatically
|
||||
compare almost equal.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertAlmostEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertAlmostEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertAlmostEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertCountEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertCountEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertCountEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Asserts that two iterables have the same elements, the same number of
|
||||
times, without regard to order.</p>
|
||||
<blockquote>
|
||||
<div><blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>self.assertEqual(Counter(list(first)),</dt><dd><p>Counter(list(second)))</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>Example:</dt><dd><ul class="simple">
|
||||
<li><p>[0, 1, 1] and [1, 0, 1] compare equal.</p></li>
|
||||
<li><p>[0, 0, 1] and [0, 1] compare unequal.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertDictContainsSubset">
|
||||
<code class="sig-name descname"><span class="pre">assertDictContainsSubset</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">subset</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dictionary</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertDictContainsSubset" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Checks whether dictionary is a superset of subset.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertDictEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertDictEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">d1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">d2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertDictEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are unequal as determined by the ‘==’
|
||||
operator.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertFalse">
|
||||
<code class="sig-name descname"><span class="pre">assertFalse</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertFalse" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Check that the expression is false.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertGreater">
|
||||
<code class="sig-name descname"><span class="pre">assertGreater</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertGreater" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a > b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertGreaterEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertGreaterEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertGreaterEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a >= b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertIn">
|
||||
<code class="sig-name descname"><span class="pre">assertIn</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">member</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">container</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertIn" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a in b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertIs">
|
||||
<code class="sig-name descname"><span class="pre">assertIs</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expr2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertIs" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a is b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertIsInstance">
|
||||
<code class="sig-name descname"><span class="pre">assertIsInstance</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cls</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertIsInstance" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Same as self.assertTrue(isinstance(obj, cls)), with a nicer
|
||||
default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertIsNone">
|
||||
<code class="sig-name descname"><span class="pre">assertIsNone</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertIsNone" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Same as self.assertTrue(obj is None), with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertIsNot">
|
||||
<code class="sig-name descname"><span class="pre">assertIsNot</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expr2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertIsNot" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a is not b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertIsNotNone">
|
||||
<code class="sig-name descname"><span class="pre">assertIsNotNone</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertIsNotNone" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Included for symmetry with assertIsNone.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertLess">
|
||||
<code class="sig-name descname"><span class="pre">assertLess</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertLess" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a < b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertLessEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertLessEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertLessEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a <= b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertListEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertListEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">list1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">list2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertListEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A list-specific equality assertion.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>list1: The first list to compare.
|
||||
list2: The second list to compare.
|
||||
msg: Optional message to use on failure instead of a list of</p>
|
||||
<blockquote>
|
||||
<div><p>differences.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertLogs">
|
||||
<code class="sig-name descname"><span class="pre">assertLogs</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">logger</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">level</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertLogs" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail unless a log message of level <em>level</em> or higher is emitted
|
||||
on <em>logger_name</em> or its children. If omitted, <em>level</em> defaults to
|
||||
INFO and <em>logger</em> defaults to the root logger.</p>
|
||||
<p>This method must be used as a context manager, and will yield
|
||||
a recording object with two attributes: <cite>output</cite> and <cite>records</cite>.
|
||||
At the end of the context manager, the <cite>output</cite> attribute will
|
||||
be a list of the matching formatted log messages and the
|
||||
<cite>records</cite> attribute will be a list of the corresponding LogRecord
|
||||
objects.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertLogs</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">,</span> <span class="n">level</span><span class="o">=</span><span class="s1">'INFO'</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">)</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s1">'first message'</span><span class="p">)</span>
|
||||
<span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s1">'foo.bar'</span><span class="p">)</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s1">'second message'</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">cm</span><span class="o">.</span><span class="n">output</span><span class="p">,</span> <span class="p">[</span><span class="s1">'INFO:foo:first message'</span><span class="p">,</span>
|
||||
<span class="s1">'ERROR:foo.bar:second message'</span><span class="p">])</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertMultiLineEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertMultiLineEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertMultiLineEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Assert that two multi-line strings are equal.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertNotAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertNotAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">places</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertNotAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are equal as determined by their
|
||||
difference rounded to the given number of decimal places
|
||||
(default 7) and comparing to zero, or by comparing that the
|
||||
difference between the two objects is less than the given delta.</p>
|
||||
<p>Note that decimal places (from zero) are usually not the same
|
||||
as significant digits (measured from the most significant digit).</p>
|
||||
<p>Objects that are equal automatically fail.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertNotAlmostEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertNotAlmostEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertNotAlmostEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertNotEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertNotEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertNotEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail if the two objects are equal as determined by the ‘!=’
|
||||
operator.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertNotEquals">
|
||||
<code class="sig-name descname"><span class="pre">assertNotEquals</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertNotEquals" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertNotIn">
|
||||
<code class="sig-name descname"><span class="pre">assertNotIn</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">member</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">container</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertNotIn" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Just like self.assertTrue(a not in b), but with a nicer default message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertNotIsInstance">
|
||||
<code class="sig-name descname"><span class="pre">assertNotIsInstance</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cls</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertNotIsInstance" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Included for symmetry with assertIsInstance.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertNotRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertNotRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unexpected_regex</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertNotRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail the test if the text matches the regular expression.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertNotRegexpMatches">
|
||||
<code class="sig-name descname"><span class="pre">assertNotRegexpMatches</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertNotRegexpMatches" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertRaises">
|
||||
<code class="sig-name descname"><span class="pre">assertRaises</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_exception</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertRaises" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail unless an exception of class expected_exception is raised
|
||||
by the callable when invoked with specified positional and
|
||||
keyword arguments. If a different type of exception is
|
||||
raised, it will not be caught, and the test case will be
|
||||
deemed to have suffered an error, exactly as for an
|
||||
unexpected exception.</p>
|
||||
<p>If called with the callable and arguments omitted, will return a
|
||||
context object used like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">):</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>An optional keyword argument ‘msg’ can be provided when assertRaises
|
||||
is used as a context object.</p>
|
||||
<p>The context manager keeps a reference to the exception as
|
||||
the ‘exception’ attribute. This allows you to inspect the
|
||||
exception after the assertion:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
<span class="n">the_exception</span> <span class="o">=</span> <span class="n">cm</span><span class="o">.</span><span class="n">exception</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">the_exception</span><span class="o">.</span><span class="n">error_code</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertRaisesRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertRaisesRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_exception</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_regex</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertRaisesRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Asserts that the message in a raised exception matches a regex.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>expected_exception: Exception class expected to be raised.
|
||||
expected_regex: Regex (re.Pattern object or string) expected</p>
|
||||
<blockquote>
|
||||
<div><p>to be found in error message.</p>
|
||||
</div></blockquote>
|
||||
<p>args: Function to be called and extra positional args.
|
||||
kwargs: Extra kwargs.
|
||||
msg: Optional message used in case of failure. Can only be used</p>
|
||||
<blockquote>
|
||||
<div><p>when assertRaisesRegex is used as a context manager.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertRaisesRegexp">
|
||||
<code class="sig-name descname"><span class="pre">assertRaisesRegexp</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertRaisesRegexp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_regex</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail the test unless the text matches the regular expression.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertRegexpMatches">
|
||||
<code class="sig-name descname"><span class="pre">assertRegexpMatches</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertRegexpMatches" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertSequenceEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertSequenceEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">seq1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">seq2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">seq_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertSequenceEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>An equality assertion for ordered sequences (like lists and tuples).</p>
|
||||
<p>For the purposes of this function, a valid ordered sequence type is one
|
||||
which can be indexed, has a length, and has an equality operator.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>seq1: The first sequence to compare.
|
||||
seq2: The second sequence to compare.
|
||||
seq_type: The expected datatype of the sequences, or None if no</p>
|
||||
<blockquote>
|
||||
<div><p>datatype should be enforced.</p>
|
||||
</div></blockquote>
|
||||
<dl class="simple">
|
||||
<dt>msg: Optional message to use on failure instead of a list of</dt><dd><p>differences.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertSetEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertSetEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">set1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">set2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertSetEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A set-specific equality assertion.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>set1: The first set to compare.
|
||||
set2: The second set to compare.
|
||||
msg: Optional message to use on failure instead of a list of</p>
|
||||
<blockquote>
|
||||
<div><p>differences.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>assertSetEqual uses ducktyping to support different types of sets, and
|
||||
is optimized for sets specifically (parameters must support a
|
||||
difference method).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertTrue">
|
||||
<code class="sig-name descname"><span class="pre">assertTrue</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertTrue" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Check that the expression is true.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertTupleEqual">
|
||||
<code class="sig-name descname"><span class="pre">assertTupleEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tuple1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tuple2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertTupleEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>A tuple-specific equality assertion.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>tuple1: The first tuple to compare.
|
||||
tuple2: The second tuple to compare.
|
||||
msg: Optional message to use on failure instead of a list of</p>
|
||||
<blockquote>
|
||||
<div><p>differences.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertWarns">
|
||||
<code class="sig-name descname"><span class="pre">assertWarns</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_warning</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertWarns" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail unless a warning of class warnClass is triggered
|
||||
by the callable when invoked with specified positional and
|
||||
keyword arguments. If a different type of warning is
|
||||
triggered, it will not be handled: depending on the other
|
||||
warning filtering rules in effect, it might be silenced, printed
|
||||
out, or raised as an exception.</p>
|
||||
<p>If called with the callable and arguments omitted, will return a
|
||||
context object used like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertWarns</span><span class="p">(</span><span class="n">SomeWarning</span><span class="p">):</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>An optional keyword argument ‘msg’ can be provided when assertWarns
|
||||
is used as a context object.</p>
|
||||
<p>The context manager keeps a reference to the first matching
|
||||
warning as the ‘warning’ attribute; similarly, the ‘filename’
|
||||
and ‘lineno’ attributes give you information about the line
|
||||
of Python code from which the warning was triggered.
|
||||
This allows you to inspect the warning after the assertion:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertWarns</span><span class="p">(</span><span class="n">SomeWarning</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
|
||||
<span class="n">do_something</span><span class="p">()</span>
|
||||
<span class="n">the_warning</span> <span class="o">=</span> <span class="n">cm</span><span class="o">.</span><span class="n">warning</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">the_warning</span><span class="o">.</span><span class="n">some_attribute</span><span class="p">,</span> <span class="mi">147</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assertWarnsRegex">
|
||||
<code class="sig-name descname"><span class="pre">assertWarnsRegex</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expected_warning</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_regex</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assertWarnsRegex" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Asserts that the message in a triggered warning matches a regexp.
|
||||
Basic functioning is similar to assertWarns() with the addition
|
||||
that only warnings whose messages also match the regular expression
|
||||
are considered successful matches.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><p>expected_warning: Warning class expected to be triggered.
|
||||
expected_regex: Regex (re.Pattern object or string) expected</p>
|
||||
<blockquote>
|
||||
<div><p>to be found in error message.</p>
|
||||
</div></blockquote>
|
||||
<p>args: Function to be called and extra positional args.
|
||||
kwargs: Extra kwargs.
|
||||
msg: Optional message used in case of failure. Can only be used</p>
|
||||
<blockquote>
|
||||
<div><p>when assertWarnsRegex is used as a context manager.</p>
|
||||
</div></blockquote>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.assert_">
|
||||
<code class="sig-name descname"><span class="pre">assert_</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.assert_" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.countTestCases">
|
||||
<code class="sig-name descname"><span class="pre">countTestCases</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.countTestCases" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.debug">
|
||||
<code class="sig-name descname"><span class="pre">debug</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.debug" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Run the test without collecting errors in a TestResult</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.defaultTestResult">
|
||||
<code class="sig-name descname"><span class="pre">defaultTestResult</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.defaultTestResult" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.doClassCleanups">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">doClassCleanups</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.doClassCleanups" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Execute all class cleanup functions. Normally called for you after
|
||||
tearDownClass.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.doCleanups">
|
||||
<code class="sig-name descname"><span class="pre">doCleanups</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.doCleanups" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Execute all cleanup functions. Normally called for you after
|
||||
tearDown.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.fail">
|
||||
<code class="sig-name descname"><span class="pre">fail</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.fail" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Fail immediately, with the given message.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.failIf">
|
||||
<code class="sig-name descname"><span class="pre">failIf</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.failIf" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.failIfAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">failIfAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.failIfAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.failIfEqual">
|
||||
<code class="sig-name descname"><span class="pre">failIfEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.failIfEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.failUnless">
|
||||
<code class="sig-name descname"><span class="pre">failUnless</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.failUnless" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.failUnlessAlmostEqual">
|
||||
<code class="sig-name descname"><span class="pre">failUnlessAlmostEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.failUnlessAlmostEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.failUnlessEqual">
|
||||
<code class="sig-name descname"><span class="pre">failUnlessEqual</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.failUnlessEqual" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.failUnlessRaises">
|
||||
<code class="sig-name descname"><span class="pre">failUnlessRaises</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.failUnlessRaises" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.failureException">
|
||||
<code class="sig-name descname"><span class="pre">failureException</span></code><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.failureException" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">AssertionError</span></code></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.id">
|
||||
<code class="sig-name descname"><span class="pre">id</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.id" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.longMessage">
|
||||
<code class="sig-name descname"><span class="pre">longMessage</span></code><em class="property"> <span class="pre">=</span> <span class="pre">True</span></em><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.longMessage" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.maxDiff">
|
||||
<code class="sig-name descname"><span class="pre">maxDiff</span></code><em class="property"> <span class="pre">=</span> <span class="pre">640</span></em><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.maxDiff" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.run">
|
||||
<code class="sig-name descname"><span class="pre">run</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">result</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.run" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.setUp">
|
||||
<code class="sig-name descname"><span class="pre">setUp</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.setUp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up the test fixture before exercising it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.setUpClass">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">setUpClass</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.setUpClass" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for setting up class fixture before running tests in the class.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.shortDescription">
|
||||
<code class="sig-name descname"><span class="pre">shortDescription</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.shortDescription" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a one-line description of the test, or None if no
|
||||
description has been provided.</p>
|
||||
<p>The default implementation of this method returns the first line of
|
||||
the specified test method’s docstring.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.skipTest">
|
||||
<code class="sig-name descname"><span class="pre">skipTest</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">reason</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.skipTest" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Skip this test.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.subTest">
|
||||
<code class="sig-name descname"><span class="pre">subTest</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">msg=<object</span> <span class="pre">object></span></em>, <em class="sig-param"><span class="pre">**params</span></em><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.subTest" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return a context manager that will return the enclosed block
|
||||
of code in a subtest identified by the optional message and
|
||||
keyword parameters. A failure in the subtest marks the test
|
||||
case as failed but resumes execution at the end of the enclosed
|
||||
block, allowing further test code to be executed.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.tearDown">
|
||||
<code class="sig-name descname"><span class="pre">tearDown</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.tearDown" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.tearDownClass">
|
||||
<em class="property"><span class="pre">classmethod</span> </em><code class="sig-name descname"><span class="pre">tearDownClass</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.tearDownClass" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Hook method for deconstructing the class fixture after running all tests in the class.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.test_CAPDU">
|
||||
<code class="sig-name descname"><span class="pre">test_CAPDU</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.test_CAPDU" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="virtualsmartcard.tests.utils_test.TestUtils.test_RAPDU">
|
||||
<code class="sig-name descname"><span class="pre">test_RAPDU</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#virtualsmartcard.tests.utils_test.TestUtils.test_RAPDU" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="pull-right">
|
||||
<a href="#">Back to top</a>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>utils Module — vsmartcard 2021-04-28 documentation</title>
|
||||
<title>utils Module — vsmartcard 2023-09-27 documentation</title>
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
|
||||
@@ -12,16 +12,16 @@
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/js/jquery-1.11.0.min.js"></script>
|
||||
<script src="../../_static/js/jquery-fix.js"></script>
|
||||
<script src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="../../_static/bootstrap-sphinx.js"></script>
|
||||
<link rel="shortcut icon" href="../../_static/chip.ico"/>
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/js/jquery-fix.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
|
||||
<script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script>
|
||||
|
||||
</head><body>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 content">
|
||||
<div class="body col-md-12 content" role="main">
|
||||
|
||||
<div class="section" id="utils-module">
|
||||
<h1>utils Module<a class="headerlink" href="#utils-module" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -455,7 +455,7 @@ hexdump(b’A’, short=True) -> ‘00 41 (.A)’</p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
© Copyright 2009-2021 by Dominik Oepen and Frank Morgner.<br/>
|
||||
© Copyright 2009-2023 by Dominik Oepen and Frank Morgner.<br/>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user