twobraids/socorro — pull request #2 by peterbe (2012-04-12 17:16:54+00:00)
Title: Hbase2012

depend on importing the whole module instead of specific classes.
IMHO, the only time you import specific objects is when you import exception classes. Sort of.

Anyway, the mocking works now. You're going to run into this error:

```
======================================================================
ERROR: test_basic_hbase_crashstorage (socorro.unittest.external.hbase.test_crashstorage.TestHBaseCrashStorage2)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/socorro/dev/socorro/socorro/unittest/external/hbase/test_crashstorage.py", line 204, in test_basic_hbase_crashstorage
self.assertEqual(result, CrashStorageBase.RETRY)
File "/usr/lib/python2.6/contextlib.py", line 34, in __exit__
self.gen.throw(type, value, traceback)
File "/home/socorro/dev/socorro/socorro-virtualenv/lib/python2.6/site-packages/configman/config_manager.py", line 244, in context
yield config
File "/home/socorro/dev/socorro/socorro/unittest/external/hbase/test_crashstorage.py", line 193, in test_basic_hbase_crashstorage
result = crashstorage.save_raw(json.loads(raw), raw)
File "/home/socorro/dev/socorro/socorro/external/hbase/crashstorage.py", line 73, in save_raw
return self.ERROR # XXX breaks
AttributeError: 'HBaseCrashStorage' object has no attribute 'ERROR'
```