Esempio n. 1
0
 def test_form_xls_only(self):
     driver.delete_form('CRF1')
     driver.upload_form(forms['xls_only'])
     d = driver.form_xls_only()
     assert d == dict(CRF1=['INFO_FULL_NAME2'])
     driver.delete_form('CRF1')
     driver.upload_form(xlsforms['CRF1'])
Esempio n. 2
0
 def test_form_xls_only(self):
     driver.delete_form('CRF1')
     driver.upload_form(forms['xls_only'])
     d = driver.form_xls_only()
     assert d == dict(CRF1=['INFO_FULL_NAME2'])
     driver.delete_form('CRF1')
     driver.upload_form(xlsforms['CRF1'])
Esempio n. 3
0
 def test_form_wrong_name(self):
     # the forms are matched to the Aggregate database using their
     # NAME not FORMID...
     driver.delete_form('CRF1')
     driver.upload_form(forms['wrong_name'])
     assert driver.form_missing() == ['CRF1']
     driver.delete_form('CRF1')
     driver.upload_form(xlsforms['CRF1'])
Esempio n. 4
0
 def test_form_wrong_name(self):
     # the forms are matched to the Aggregate database using their
     # NAME not FORMID...
     driver.delete_form('CRF1')
     driver.upload_form(forms['wrong_name'])
     assert driver.form_missing() == ['CRF1']
     driver.delete_form('CRF1')
     driver.upload_form(xlsforms['CRF1'])
Esempio n. 5
0
 def test_missing_alert(self):
     driver.overview_go('All')
     assert driver.alerts() == []
     driver.delete_form('CRF1')
     driver.overview_go('All')
     alerts = driver.alerts()
     assert len(alerts) == 2
     assert len([alert for alert in alerts if 'not found' in alert]) == 1
     assert len([alert for alert in alerts if '.xls not uploaded' in alert]) == 1
     driver.upload_form(xlsforms['CRF1'])
Esempio n. 6
0
 def test_missing_alert(self):
     driver.overview_go('All')
     assert driver.alerts() == []
     driver.delete_form('CRF1')
     driver.overview_go('All')
     alerts = driver.alerts()
     assert len(alerts) == 2
     assert len([alert for alert in alerts if 'not found' in alert]) == 1
     assert len([alert for alert in alerts
                 if '.xls not uploaded' in alert]) == 1
     driver.upload_form(xlsforms['CRF1'])
Esempio n. 7
0
 def test_form_remove_upload(self):
     assert 'CRF1' in driver.formids()
     driver.delete_form('CRF1')
     assert not 'CRF1' in driver.formids()
     driver.upload_form(xlsforms['CRF1'])
     assert 'CRF1' in driver.formids()
Esempio n. 8
0
 def test_form_remove_upload(self):
     assert 'CRF1' in driver.formids()
     driver.delete_form('CRF1')
     assert not 'CRF1' in driver.formids()
     driver.upload_form(xlsforms['CRF1'])
     assert 'CRF1' in driver.formids()