[skeleton] Update Debian packaging template
Here are multiple updates to the Debian packaging template provided when
running `cubicweb-ctl newcube`:
* Switch to source format 3.0 (quilt).
* Switch to debhelper 9.
* Switch to dh-python.
* Switch to Python 3.
* Name the binary package `python3-cubicweb-CUBENAME` instead of
just `cubicweb-CUBENAME` (which is still the source package).
* Populate Depends using dh_python3 support for Python requirements.
* Run test suite at build time using pytest.
* Add autopkgtest to run test suite against the installed package.
* Bump Standards-Version to 4.3.0.
from unittest import TestCase
from cubicweb import crypto
class CryptoTC(TestCase):
def test_encrypt_decrypt_roundtrip(self):
data = {'a': u'ah', 'b': [1, 2]}
seed = 'ssss'
crypted = crypto.encrypt(data, seed)
decrypted = crypto.decrypt(crypted, seed)
self.assertEqual(decrypted, data)
if __name__ == '__main__':
import unittest
unittest.main()