Code review comment for lp:~thisfred/ubuntuone-client/quota-notifications

Revision history for this message
Eric Casteleijn (thisfred) wrote :

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