def version_view(request): # Fetch the versions of some Packages # Ringo values = {} formbar_pkg = pkg_resources.get_distribution('formbar') sqla_pkg = pkg_resources.get_distribution('sqlalchemy') pyramid_pkg = pkg_resources.get_distribution('pyramid') values['app_title'] = get_app_title() values['app_version'] = get_app_version() values['app_name'] = get_app_name() values['ringo_version'] = get_ringo_version() values['app_version'] = get_app_version() values['formbar_version'] = formbar_pkg.version values['sqlalchemy_version'] = sqla_pkg.version values['pyramid_version'] = pyramid_pkg.version return values
def version_view(request): # Fetch the versions of some Packages # Ringo handle_history(request) values = {} formbar_pkg = pkg_resources.get_distribution('formbar') sqla_pkg = pkg_resources.get_distribution('sqlalchemy') pyramid_pkg = pkg_resources.get_distribution('pyramid') values['app_title'] = get_app_title() values['app_version'] = get_app_version() values['app_name'] = get_app_name() values['ringo_version'] = get_ringo_version() values['app_version'] = get_app_version() values['formbar_version'] = formbar_pkg.version values['sqlalchemy_version'] = sqla_pkg.version values['pyramid_version'] = pyramid_pkg.version return values
def test_get_ringo_version(): from ringo.lib.helpers import get_ringo_version result = get_ringo_version() assert isinstance(result, basestring)