Skip to content

Commit

Permalink
Added APISpec to conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Collins committed Apr 14, 2020
1 parent e00f12d commit 8e2912a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import pytest
from flask import Flask
from apispec import APISpec
from apispec.ext.marshmallow import MarshmallowPlugin

@pytest.fixture
def spec():
return APISpec(
title="Python-LabThings PyTest",
version="1.0.0",
openapi_version="3.0.2",
plugins=[MarshmallowPlugin()],
)


@pytest.fixture()
Expand Down
12 changes: 0 additions & 12 deletions tests/test_server_spec_utilities.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from labthings.server.spec import utilities
import json
from apispec import APISpec
from apispec.ext.marshmallow import MarshmallowPlugin
from marshmallow import fields
import pytest

Expand All @@ -24,16 +22,6 @@ def delete(self):
return ViewClass


@pytest.fixture
def spec():
return APISpec(
title="Python-LabThings PyTest",
version="1.0.0",
openapi_version="3.0.2",
plugins=[MarshmallowPlugin()],
)


def test_initial_update_spec(view_class):
initial_spec = {"key": "value"}
utilities.update_spec(view_class, initial_spec)
Expand Down

0 comments on commit 8e2912a

Please sign in to comment.