def random_system(): s = System.create(60) s.put() yield s s.key.delete()
def create(cls, user_obj, grace): system = System.create(grace) system.put() return cls(user_key=user_obj.key, system_key=system.key)