Esempio n. 1
0
def imprint(request):
    """
    View configuration for the imprint.

    :param request: current request of the server
    :return: dictionary with title and project name as well as a value, weather the user is logged in
    """
    LOG.debug("Return imprint view.")
    # add version of pyramid
    request.decorated['extras'].update(
        {'pyramid_version': pkg_resources.get_distribution('pyramid').version})

    prep_dict = main_dict(
        request,
        Translator(get_language_from_cookie(request)).get(_.imprint))
    prep_dict.update({'imprint': get_changelog(5)})
    return prep_dict
Esempio n. 2
0
 def test_get_changelog(self):
     self.assertEqual(len(lib.get_changelog(1)), 1)
     self.assertEqual(len(lib.get_changelog(3)), 3)
     self.assertIsInstance(lib.get_changelog(1), list)
     self.assertIsInstance(lib.get_changelog(1)[0], dict)
Esempio n. 3
0
 def test_get_changelog(self):
     self.assertEqual(1, len(lib.get_changelog(1)))
     self.assertEqual(3, len(lib.get_changelog(3)))
     self.assertEqual(type(list()), type(lib.get_changelog(1)))
     self.assertEqual(type(dict()), type(lib.get_changelog(1)[0]))