def test_clear_resets_presence(): tag = Flag('wanderer') tag.touch() assert tag.present tag.clear() assert not tag.present
def test_bool_truthy_when_present(): tag = Flag('foreign') assert not tag tag.touch() assert tag
def test_not_filled_with_no_values(): flag = Flag('wanderer') flag.touch() assert not flag.filled
def test_update_from_flag_copies_presence(self): copyable = Flag('wanderer') copyable.touch() tag = Flag('wanderer') tag.update(copyable) assert tag.present
def test_present_with_no_values(): flag = Flag('wanderer') flag.touch() assert flag.present
def test_required_with_no_values_passes(self): tag = Flag('type', required=True) tag.touch() tag.validate() assert tag.valid
def test_header_filled_with_no_values(): flag = Flag('wanderer') flag.touch() header = flag.to_header() assert '@wanderer' in header