def test_parse_action(self): python_file = PythonFile(None, None) eq_("unit", python_file.parse_action("@rapid-unit Test:Test:Testing")) eq_("unit", python_file.parse_action("rapid-unit: Test:Test:Testing")) eq_(None, python_file.parse_action("@@@@rapid-unit12: Test:Test:Testing"))
def test_handle_unit_with_colon(self): file = PythonFile(None, None) file.handle_unit(" @rapid-unit: Area:Feature:Behavior point") eq_( file._current_settings, { file.AREA: 'Area', file.FEATURE: 'Feature', file.BP: 'Behavior point', 'level': 'unit' })
def test_handle_selenium_without_colon(self): file = PythonFile(None, None) file.handle_selenium(" @rapid-selenium Area:Feature:Behavior point") eq_( file._current_settings, { file.AREA: 'Area', file.FEATURE: 'Feature', file.BP: 'Behavior point', 'level': 'selenium' })
def test_handle_tags_without_colon(self): file = PythonFile(None, None) file.handle_tags(" @rapid-tags This is a tag") eq_(file._current_settings, {'tags': ['This', 'is', 'a', 'tag']})