#108 Fix some tests and docs
Opened 5 years ago by qulogic. Modified 2 years ago
qulogic/mdapi tests  into  master

file modified
+3 -3
@@ -144,10 +144,10 @@ 

  

      packages requiring R in rawhide:

      <a href="/rawhide/requires/R">/rawhide/requires/R</a>

-       To see what R itself requires, check its information using: <a href="$PREFIX/rawhide/pkg/R">/rawhide/pkg/R</a>

The $PREFIX is/was used when mdapi is deployed not at the root of the server. This is no longer and issue for us, but it may still be if someone wanted to deploy it somewhere else.

+       To see what R itself requires, check its information using: <a href="/rawhide/pkg/R">/rawhide/pkg/R</a>

  

-     packages providing perl(SetupLog) in rawhide:

-     <a href="/rawhide/provides/perl(SetupLog)">/rawhide/provides/perl(SetupLog)</a>

+     packages providing perl(CGI) in rawhide:

+     <a href="/rawhide/provides/perl(CGI)">/rawhide/provides/perl(CGI)</a>

  

      packages obsoleting cabal2spec in rawhide:

      <a href="/rawhide/obsoletes/cabal2spec">rawhide/obsoletes/cabal2spec</a>

file modified
+3 -5
@@ -32,9 +32,7 @@ 

  import sys

  import tempfile

  

- import mock

  import pytest

- from aiohttp import web

  

  sys.path.insert(0, os.path.join(os.path.dirname(

      os.path.abspath(__file__)), '..'))
@@ -80,10 +78,10 @@ 

  

  

  @pytest.fixture

- async def cli(set_env, tmpdir, loop, test_client):

+ async def cli(set_env, tmpdir, aiohttp_client):

      mdapi.CONFIG['DB_FOLDER'] = tmpdir

      app = await init_app()

-     return await test_client(app)

+     return await aiohttp_client(app)

  

  

  
@@ -144,7 +142,7 @@ 

  

  @pytest.mark.parametrize("action, package, status_code", [

      ("requires", "R", 200),

-     ("provides", "perl(SetupLog)", 200),

+     ("provides", "perl(CGI)", 200),

      ("provides", "R", 200),

      ("obsoletes", "cabal2spec", 200),

      ("conflicts", "mariadb", 200),

file modified
+2 -6
@@ -26,13 +26,9 @@ 

  

  '''

  import os

- import shutil

- import subprocess

  import sys

- import tempfile

  

  import pytest

- from aiohttp import web

  

  sys.path.insert(0, os.path.join(os.path.dirname(

      os.path.abspath(__file__)), '..'))
@@ -44,10 +40,10 @@ 

  

  

  @pytest.fixture

- async def cli(loop, test_client):

+ async def cli(aiohttp_client):

      mdapi.CONFIG['DB_FOLDER'] = '.'

      app = await init_app()

-     return await test_client(app)

+     return await aiohttp_client(app)

  

  

  async def test_view_index_page(cli):

file modified
-1
@@ -10,7 +10,6 @@ 

      pytest

      pytest-cov

      pytest-aiohttp

-     mock

  setenv =

      PYTHONPATH={toxinidir}

  commands =

Fixes broken tests and docs, deprecations, and unused imports.

rebased onto c450632

5 years ago

The $PREFIX is/was used when mdapi is deployed not at the root of the server. This is no longer and issue for us, but it may still be if someone wanted to deploy it somewhere else.

But $PREFIX doesn't make sense as the target of the link in the help page; it's just a broken link then.

rebased onto 1cfd606

4 years ago

rebased onto 406ca59

4 years ago

rebased onto d5e5119

4 years ago

rebased onto 7a54207

4 years ago

rebased onto bd89650

4 years ago

rebased onto a70f47d

4 years ago

Ping? It's been 2 years.

Can this be merged please?

Hi there,

This project is now maintained at https://github.com/fedora-infra/mdapi.

Thanks!