def METHOD_NAME(self):
    cmd = toga.Command(lambda x: print("Hello World"), label="test")
    new_text = "New Text"
    with self.assertWarns(DeprecationWarning):
        cmd.label = new_text
    with self.assertWarns(DeprecationWarning):
        self.assertEqual(cmd.label, new_text)
    self.assertEqual(cmd.text, new_text)