def setUp(self): super(DatagridInPanelTestcase, self).setUp() self.builder_json = readfile('data', 'test_datagrid_in_panel_builder.json') self.one_row_form_json = readfile( 'data', 'test_datagrid_in_panel_one_row_form.json')
def setUp(self): super(CommonTestCase, self).setUp() # test_example_builder.json # - shown: https://formio.github.io/formio.js/ # - source: https://examples.form.io/example self.builder_json = readfile('data', 'test_example_builder.json') self.form_json = readfile('data', 'test_example_form.json')
def setUp(self): super(ConditionalVisibilitySimpleTestCase, self).setUp() self.builder_json = readfile( 'data', 'test_conditional_visibility_simple_builder.json') self.hide_password_form_json = readfile( 'data', 'test_conditional_visibility_simple_hide_password.json') self.show_textfield_form_json = readfile( 'data', 'test_conditional_visibility_simple_show_textfield.json')
def setUp(self): super(ConditionalVisibilityJsonLogicTestCase, self).setUp() self.builder_json = readfile( 'data', 'test_conditional_visibility_json_logic_builder.json') self.hide_secret_form_json = readfile( 'data', 'test_conditional_visibility_json_logic_hide_secret.json') self.show_secret_form_json = readfile( 'data', 'test_conditional_visibility_json_logic_show_secret.json')
def setUp(self): super(NestedTestCase, self).setUp() # logging # msg = self.id() # if self.shortDescription(): # msg += ' -- %s' % self.shortDescription() # self.logger.info(msg) self.builder_json = readfile('data', 'test_nested_components_builder.json') self.form_json = readfile('data', 'test_nested_components_form.json')
def test_can_be_parsed_from_xml(self): # FIXME check if all fields parsed correctly xml = XML(readfile('task_get.xml')) t = Task() t._from_etree(xml) assert t.id == 71 assert t.description == 'find shields' assert t.position == 1 assert t.complete == False
def test_can_be_parsed_from_xml(self): # FIXME check if all fields parsed correctly xml = XML(readfile('story_get.xml')) s = Story() s._from_etree(xml) assert s.name == 'More power to shields' assert len(s.notes) == 1 assert s.notes[0].author == 'Anatoly Kudinov' assert s.notes[0].id == 13478987 assert len(s.attachments) == 1 assert s.attachments[0].id == 4
def test_can_be_moved(self): mock = _M(readfile('story_get.xml')) p = patch('requests.post', mock) s = Story() s.id = 10 s.project_id = 1 s.client = Client(token='tpken') p.start() new_story = s.move_after(15) assert mock.call_args[1]['params']['move[move]']=='after' assert mock.call_args[1]['params']['move[target]']==15 assert new_story.id == 227 s.move_before(new_story) assert mock.call_args[1]['params']['move[move]']=='before' assert mock.call_args[1]['params']['move[target]']==227 p.stop()
def test_can_be_moved(self): mock = _M(readfile('story_get.xml')) p = patch('requests.post', mock) s = Story() s.id = 10 s.project_id = 1 s.client = Client(token='tpken') p.start() new_story = s.move_after(15) assert mock.call_args[1]['params']['move[move]'] == 'after' assert mock.call_args[1]['params']['move[target]'] == 15 assert new_story.id == 227 s.move_before(new_story) assert mock.call_args[1]['params']['move[move]'] == 'before' assert mock.call_args[1]['params']['move[target]'] == 227 p.stop()
def setUp(self): super(CommonTestCase, self).setUp() # test_example_builder.json # - shown: https://formio.github.io/formio.js/ # - source: https://examples.form.io/example self.builder_json = readfile('data', 'test_example_builder.json') self.builder_resource = readfile( 'data', 'test_example_builder_with_resource.json') self.builder_with_resource = readfile( 'data', 'test_example_builder_with_resource.json') self.form_json = readfile('data', 'test_example_form.json') self.form_empty_json = readfile('data', 'test_example_form_empty.json') self.form_json_check_default = readfile( 'data', 'test_example_form_check_default.json') self.form_with_resource = readfile( "data", "test_example_form_with_resource.json") self.builder_json_resource = readfile( 'data', 'test_resources_submission.json')