Remove mock and update tests

This commit is contained in:
Andrew Rabert 2018-11-26 17:29:32 -05:00
parent 234fb6d479
commit 78e063963d
2 changed files with 3 additions and 10 deletions

View file

@ -1,4 +1,3 @@
coverage>=4.5,<5
mock>=1.3,<2
nose>=1.3.7,<2
tox>=3.5,<4

View file

@ -1,3 +1,4 @@
from unittest import mock
import contextlib
import distutils.dist
import distutils.errors
@ -7,13 +8,6 @@ import json
import time
import unittest
try:
from unittest import mock
open_name = 'builtins.open'
except ImportError:
import mock
open_name = '__builtin__.open'
from tornado import concurrent, httpserver, httputil, ioloop, testing, web
import sprockets.http.mixins
@ -522,7 +516,7 @@ class RunCommandTests(MockHelper, unittest.TestCase):
'# commented line',
'SHOULD_BE=',
]))
self.start_mock(open_name, open_mock)
self.start_mock('builtins.open', open_mock)
command = sprockets.http.runner.RunCommand(self.distribution)
command.dry_run = True
@ -548,7 +542,7 @@ class RunCommandTests(MockHelper, unittest.TestCase):
os_module.path.exists.return_value = True
open_mock = mock.mock_open(read_data='PORT=2')
self.start_mock(open_name, open_mock)
self.start_mock('builtins.open', open_mock)
command = sprockets.http.runner.RunCommand(self.distribution)
command.dry_run = True