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