@@ -0,0 +1,2638 @@
+import mock%0Aimport time%0Aimport unittest%0Afrom nose.tools import *%0A%0Afrom framework.render import core%0Afrom framework.render import exceptions%0A%0A%0Aclass TestRenderIsHappening(unittest.TestCase):%0A%0A    @mock.patch('framework.render.core.os.path.isfile')%0A    def test_cache_exists_is_true(self, mock_isfile):%0A        mock_isfile.return_value = True%0A        assert_true(core.render_is_done_or_happening('path', 'path'))%0A%0A    @mock.patch('framework.render.core.os.path.isfile')%0A    def test_nothing_exists(self, mock_isfile):%0A        mock_isfile.return_value = False%0A        assert_false(core.render_is_done_or_happening('path', 'path'))%0A%0A    @mock.patch('framework.render.core.os.remove')%0A    @mock.patch('framework.render.core.os.path.isfile')%0A    @mock.patch('framework.render.core.os.path.getmtime')%0A    def test_old_temp(self, mockmtime, mock_isfile, mock_remove):%0A        mockmtime.return_value = 0%0A        mock_isfile.side_effect = %5BFalse, True%5D%0A%0A        assert_false(core.render_is_done_or_happening('path', 'path'))%0A%0A    @mock.patch('framework.render.core.os.remove')%0A    @mock.patch('framework.render.core.os.path.isfile')%0A    @mock.patch('framework.render.core.os.path.getmtime')%0A    def test_temp_newish(self, mockmtime, mock_isfile, mock_remove):%0A        mockmtime.return_value = time.time()%0A        mock_isfile.side_effect = %5BFalse, True%5D%0A%0A        assert_true(core.render_is_done_or_happening('path', 'path'))%0A%0A%0A@mock.patch('__builtin__.open')%0A@mock.patch('framework.render.core.requests.get')%0Aclass TestSaveOrError(unittest.TestCase):%0A%0A    @mock.patch('framework.render.core.error_message_or_exception')%0A    def test_bad_response(self, mock_eme, mock_request, mock_file):%0A        mock_request.return_value = mock.Mock(ok=False, status_code=418)%0A%0A        core.save_to_file_or_error('test', 'test')%0A%0A        mock_request.assert_called_once_with('test', stream=True)%0A        mock_eme.assert_called_once_with(418, dest_path='test', download_url='test')%0A%0A    @mock.patch('framework.render.core.error_message_or_exception')%0A    def test_good_response(self, mock_eme, mock_request, mock_file):%0A        mock_request.return_value = mock.MagicMock(ok=True)%0A%0A        core.save_to_file_or_error('test', 'test')%0A%0A        assert_false(mock_eme.called)%0A        mock_request.assert_called_once_with('test', stream=True)%0A%0A    def test_bad_response_raises(self, mock_request, mock_file):%0A        mock_request.return_value = mock.Mock(ok=False, status_code=418)%0A%0A        with self.assertRaises(exceptions.RenderFailureException):%0A            core.save_to_file_or_error('test', 'test')%0A%0A        mock_request.assert_called_once_with('test', stream=True)%0A

Add a couple render tests