def collection_get(self): """ Get all flags in the system. """ # pylint: disable=no-self-use return [FlagSchema(flag).__dict__ for flag in BinaryFlag.all()]
def test_get_all_flags(self, fakestore): names = ["flag0", "flag1", "flag2"] for name in names: BinaryFlag.create(name, store=fakestore) allflags = BinaryFlag.all(store=fakestore) assert len(allflags) == len(names) for flag in allflags: assert flag.name in names