Changeset 2830 for pykota/trunk/pykota/accounters/pjl.py
- Timestamp:
- 04/04/06 11:40:56 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/pjl.py
r2637 r2830 202 202 """Tries PJL accounting for a printer host.""" 203 203 class fakeFilter : 204 """Fakes a filter for testing purposes.""" 204 205 def __init__(self) : 206 """Initializes the fake filter.""" 205 207 self.PrinterName = "FakePrintQueue" 206 208 self.JobSizeBytes = 1 207 209 208 210 def printInfo(self, msg, level="info") : 211 """Prints informational message.""" 209 212 sys.stderr.write("%s : %s\n" % (level.upper(), msg)) 210 213 sys.stderr.flush() 211 214 212 215 def logdebug(self, msg) : 216 """Prints debug message.""" 213 217 self.printInfo(msg, "debug") 214 218 215 219 class fakeAccounter : 220 """Fakes an accounter for testing purposes.""" 216 221 def __init__(self) : 222 """Initializes fake accounter.""" 217 223 self.arguments = "pjl:9100" 218 224 self.filter = fakeFilter() … … 220 226 221 227 def getLastPageCounter(self) : 228 """Fakes the return of a page counter.""" 222 229 return 0 223 230