change(aurblup): converted to use aurweb.db ORM

Introduces:
- aurweb.testing.alpm.AlpmDatabase
    - Used to mock up and manage a remote repository.
- templates/testing/alpm_package.j2
    - Used to generate a single ALPM package desc.
- Removed aurblup sharness test

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-11-17 08:04:33 -08:00
parent 3efb9a57b5
commit 29989b7fdb
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
7 changed files with 246 additions and 72 deletions

View file

@ -125,6 +125,11 @@ async def make_variable_context(request: Request, title: str, next: str = None):
return context
def base_template(path: str):
templates = copy.copy(_env)
return templates.get_template(path)
def render_raw_template(request: Request, path: str, context: dict):
""" Render a Jinja2 multi-lingual template with some context. """
# Create a deep copy of our jinja2 _environment. The _environment in