Skip to content

Commit

Permalink
Another test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson committed Feb 5, 2017
1 parent 2aca84e commit f98ec20
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_web.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

import asynctest
import asynctest.mock as amock

from opsdroid.core import OpsDroid
from opsdroid import web
Expand Down Expand Up @@ -61,3 +62,11 @@ async def test_web_stats_handler(self):
app = web.Web(opsdroid)
self.assertEqual(
type(app.web_stats_handler(None)), aiohttp.web.Response)

async def test_web_start(self):
"""Check the stats handler."""
with OpsDroid() as opsdroid:
with amock.patch('aiohttp.web.run_app') as webmock:
app = web.Web(opsdroid)
app.start()
self.assertTrue(webmock.called)

0 comments on commit f98ec20

Please sign in to comment.