Ok, found a better test for this:
change the method at line 940- of tests/status/test_aggregator.py to this:
def test_root_quota_exceeded(self): # pylint: disable=R0201 """Quota exceeded in root.""" ## mocker = Mocker() ## open_volumes = mocker.replace( ## "ubuntuone.platform.messaging.open_volumes") ## open_volumes() ## mocker.replay() ROOT_ID = 'fake root id' root = Root(volume_id=ROOT_ID) self.fakevm.volumes[ROOT_ID] = root self.fakevm.root = root self.listener.handle_SYS_QUOTA_EXCEEDED( volume_id=ROOT_ID, free_bytes=0) import pdb; pdb.set_trace()
and run:
PYTHONPATH=. u1trial tests/status/test_aggregator.py
you should now see the panel pop up/switch to volumes.
« Back to merge proposal
Ok, found a better test for this:
change the method at line 940- of tests/status/ test_aggregator .py to this:
def test_root_ quota_exceeded( self): # pylint: disable=R0201 platform. messaging. open_volumes" ) id=ROOT_ ID)
self.fakevm. volumes[ ROOT_ID] = root
self.fakevm. root = root
self.listener. handle_ SYS_QUOTA_ EXCEEDED(
volume_ id=ROOT_ ID, free_bytes=0)
"""Quota exceeded in root."""
## mocker = Mocker()
## open_volumes = mocker.replace(
## "ubuntuone.
## open_volumes()
## mocker.replay()
ROOT_ID = 'fake root id'
root = Root(volume_
import pdb; pdb.set_trace()
and run:
PYTHONPATH=. u1trial tests/status/ test_aggregator .py
you should now see the panel pop up/switch to volumes.