In my application, I have two classes: a log that actually logs into the database and a dummy logger that does nothing (used when logging is disabled). Here is the whole 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 the one hand, I should probably let this go, and not test it, since there really is no code to test. But then my βinfectedβ instinct tells me that this is an excuse and that the simplicity of the class means that I should be more prepared to test it. I'm just having problems with what to test.
Any ideas? Or should I just let it go and not write any tests?
source share