Skip to content

Commit

Permalink
code quality tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalshaikh42 committed Aug 29, 2019
1 parent 083f9f6 commit 95fe8ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion datanator_rest_api/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def createApp(apiName="DatanatorAPI.yaml", entryModule="datanator_rest_api.route
return app


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover

app = createApp()
app.run(port=8080, debug=True)
2 changes: 1 addition & 1 deletion datanator_rest_api/spec/SpecUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def uploadAPI(api_file):
pass


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
res_api = SpecUtils.parseAPI(api_dir='.', src_file='root.yaml')
try:
SpecUtils.validateAPI(res_api)
Expand Down
16 changes: 0 additions & 16 deletions tests/spec/test_implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,6 @@
import datanator_rest_api.core as core
from prance import BaseParser


class ImplementationTestCase(unittest.TestCase):
def setUp(self):

self.AutoResolver = core.AutoResolver
self.app = connexion.App(__name__)
self.app.add_api('../../datanator_rest_api/spec/DatanatorAPI.yaml', resolver=self.AutoResolver(
"datanator_rest_api.routes"), validate_responses=False)
self.client = self.app.app.test_client()
self.client.testing = True

def test_1(self):
response = self.client.get('/datanator/')
assert(response.status_code == 200)


class RoutesTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
Expand Down
7 changes: 7 additions & 0 deletions tests/spec/test_specificiation_is_valid.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
""" test_specificiation_is_valid
:Author: Bilal Shaikh < bilalshaikh42@gmail.com >
:Date: 2019-08-26
:Copyright: 2019, Karr Lab
:License: MIT
"""
import datanator_rest_api.spec as spec
import datanator_rest_api.core as core
import unittest
Expand Down

0 comments on commit 95fe8ff

Please sign in to comment.