1

When I was looking at the source code for capability_stub.py in app engine's testbed framework, I saw a comment stating that every service was always enabled. Now, is there a way to simmulate certain outages by disabling certain services, other than writing my own stub?

bigblind
  • 12,539
  • 14
  • 68
  • 123

1 Answers1

3
testbed = testbed.Testbed()
testbed.activate()
testbed.init_capability_stub()
stub = testbed.get_stub('capability_service')
stub.SetPackageEnabled('memcache', False)
from google.appengine.api import capabilities
assert(capabilities.CapabilitySet('memcache').is_enabled() == False)
proppy
  • 10,495
  • 5
  • 37
  • 66
  • 1
    I'll give you the bounty as soon as I can, it says I can award it in 4 hours. thx for the answer. – bigblind Sep 06 '12 at 19:26