Permalink
Browse files

Added cloudprintrequestor unit test

  • Loading branch information...
simoncadman committed Dec 30, 2012
1 parent 91e3105 commit 556e8da93b8aa3145f167e59f81c868de02daafb
Showing with 24 additions and 1 deletion.
  1. +1 −1 cloudprintrequestor.py
  2. +23 −0 test_cloudprintrequestor.py
View
@@ -36,7 +36,7 @@ def getAccount ( self ):
"""
return self.account
- def doRequest ( self, path, headers = None, data = None , boundary = None ):
+ def doRequest ( self, path, headers = None, data = None , boundary = None ): # pragma: no cover
"""Sends a request to Google Cloud Print
Args:
@@ -0,0 +1,23 @@
+#! /usr/bin/env python2
+# CUPS Cloudprint - Print via Google Cloud Print
+# Copyright (C) 2011 Simon Cadman
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from cloudprintrequestor import cloudprintrequestor
+
+def test_requestor():
+ requestor = cloudprintrequestor()
+ requestor.setAccount('testdetails')
+ assert requestor.getAccount() == 'testdetails'

0 comments on commit 556e8da

Please sign in to comment.