def load(self):
        if os.path.exists(self.path):
            with open(self.path, 'r') as f:
                self.body_labels = collections.OrderedDict(json.load(f))
def test_cnli_caps_on(fake_qtile, patched_cnli, fake_window):
    widget = patched_cnli.CapsNumLockIndicator()

    # Simulate Caps on
    MockCapsNumLockIndicator.index = 1

    fakebar = FakeBar([widget], window=fake_window)
    widget._configure(fake_qtile, fakebar)
    text = widget.poll()

    assert text == "Caps on Num on"