hasadna / knesset-data-django

Django-specific APis and modules for working with Knesset (Israeli parliament) data
3 stars 5 forks source link

Faster tests + FIx dev dependency installation + main part of speaker_id fix #833 in oknesset + update travis tests #9

Closed alonisser closed 7 years ago

alonisser commented 7 years ago

fix #8 fix #10 fix #1

alonisser commented 7 years ago

@OriHoch I updated data-package and knesset-data to latest version in travis and one of tests (yours) fails. Please take a look, Shouldn't we work with latest data package? (Before Update something else was also broken)

alonisser commented 7 years ago

@OriHoch Looks like test were depended on specific data migration creating things, which both made the tests fragile and slow (since Oknesset full migrations instead of syncdb in tests) I'm investigating on what exactly. referring to this code

    def given_db_initialized_with_required_data(self):
        knesset = Knesset.objects.current_knesset()
        self.assertTrue(knesset.number > 18)

Also I reverted back before my changes and with the latest datapackage and tests still fails. Maybe something I should load to my computer so this can be tested?

alonisser commented 7 years ago

@OriHoch Maybe this line is a clue in your comments:

# ** extracting the test datapackage
# knesset-data-django$ ./manage.py download_knesset_datapackage --file=knesset_data_django/common/tests/datapackage_last_120_days_2017-02-24.zip

This file does not exists in the repo. Should it be downloaded from s3? If so how do the tests in travis actually run without?

OriHoch commented 7 years ago

changes to this PR which should fix the datapackage problems - https://github.com/alonisser/knesset-data-django/pull/1