In my application, I have two classes: a logger that actually logs to the database and a dummy logger that does nothing (used when logging is disabled). Here is the entire DummyLog class:
class DummyLog(object):
def insert_master_log(self, spec_name, file_name, data_source,
environment_name):
pass
def update_master_log(self, inserts, updates, failures, total):
pass
On one hand, I should probably let this go and not test it since there's not really any code to test. But then, my "test-infected" instinct tells me that this is an excuse and that the simplicity of the class means I should be more willing to test it. I'm just having trouble thinking of what to test.
Any ideas? Or should I just let this go and not write any tests?