summaryrefslogtreecommitdiffstats
path: root/packages
AgeCommit message (Collapse)AuthorFilesLines
2019-03-02packages: use Pythonic syntax instead of len()Jelle van der Waa1-1/+1
not foo is preferred over len(foo) == 0.
2019-02-18flag: move inline css to a separate fileJelle van der Waa1-0/+4
CSP dissalows inline CSS styles so move the CSS to a separate file.
2019-02-18packages: remove inline style from flag out of dateJelle van der Waa1-1/+1
Remove inline style and add new CSS rule for it.
2019-02-09Minor code cleanup, formatting, and simplification.Aleksandar Trifunovic2-22/+20
2019-02-09add testAleksandar Trifunovic1-1/+13
2019-02-09packages: basic test for signoff pagesJelle van der Waa1-0/+36
2019-02-09packages: add tests for unflaggingJelle van der Waa1-0/+54
2019-01-21Fix tests for Python3 by decoding byteJelle van der Waa1-3/+3
2019-01-21Update migrations for Python 3Jelle van der Waa1-30/+30
2019-01-21reduce in py3 is in functoolsAleksandar Trifunovic1-0/+1
2019-01-21Revert "Fix parsing issues when query string keys contain unicode"Jelle van der Waa1-6/+0
This reverts commit bb18fa3323a0494a2774ea61911572b089d04b6d.
2019-01-21Refactor Python 3 __unicode__ to __str__Frank Vanderham1-10/+10
In Python 3 for Django, class method __unicode__ must be changed to __str__. This commit replaces all models that use __unicode__ to __str__.
2019-01-21packages.tests: convert response.content to strJelle van der Waa1-14/+14
2019-01-21packages: tests: ctypes now returns bytesJelle van der Waa1-1/+1
2019-01-21packages: c_char_p ctype is bytes in Python 3Jelle van der Waa1-1/+1
See ctypes documentation for a table of the fundamental data types where c_char_p is defined as a bytes object.
2019-01-21main: run 2to3Jelle van der Waa6-36/+36
2019-01-21Update urlparse related importsJelle van der Waa2-3/+2
2019-01-21Remove all squashed migrationsJelle van der Waa4-246/+0
this makes it easier to upgrade to Python 3 since less on_delete lines have to be fixed.
2018-12-16Merge pull request #154 from jelly/squashmigrationsjelle van der Waa1-0/+193
squash all migrations
2018-11-30packages: test stale relationsJelle van der Waa1-0/+4
2018-11-30packages: add pragma no cover for alpmJelle van der Waa1-3/+3
travisci runs tests on a different distro, so libalpm is not testable.
2018-11-23packages: test adopt/disown functionalityJelle van der Waa1-1/+65
2018-11-17Squash all migrationsJelle van der Waa1-0/+193
2018-11-17Fix Foreignkey implicit on_delete on django < 2.0Jelle van der Waa1-17/+17
Foreignkey used to implicitly be on_delete=models.CASCADE and has to be explicit now.
2018-11-17Using user.is_authenticated() as a method is deprecatedJelle van der Waa2-5/+5
Use is_authenticated as an attribute.
2018-08-12packages: test head/$arch group viewJelle van der Waa1-2/+9
2018-08-12packages: remove unused get_differences_infoJelle van der Waa2-58/+4
The view which used get_differences_info was removed in 373a426cb1ccbcaf9c43f but didn't clean up the utility functions.
2018-08-12packages: test sort parameter for searchJelle van der Waa1-0/+5
2018-08-12packages: Add test for search head requestJelle van der Waa1-0/+5
2018-07-29packages: remove unused signoff_reportJelle van der Waa1-126/+0
2018-07-13Widen the search resultsAleksandar Trifunovic1-2/+6
Previously the search that had a space in it yields no results if the match is not exact e.g. ``archlinux keyring`` yields no results even though there is a package ``archlinux-keyring``. This patch modifies the query to search for ``archlinux AND keyring``, both for package names and package descriptions. This leads to more search results.
2018-06-17test: use response.json()Jelle van der Waa1-9/+8
Instead of importing json and loading the response.content using json.loads use Django's response.json() method.
2018-06-09Fix a typo in packages/models.pyFelix Yan1-1/+1
2018-06-08feeds: Add package removal / deletion feedJelle van der Waa1-0/+4
Add new feeds for newly added packages and packages which where removed from the repository's.
2018-05-07Remove calls to order_by() without parametersFrank Vanderham1-1/+1
Calls to order_by() without passing any parameters was causing UnorderedObjectListWarning during unit tests. The failing unit tests were testing the sitemap functionality. Sitemaps utilize Paginators, which require either the entity ordering as specified in their Meta object, or a specific ordering in the QuerySet, otherwise this warning is issued.
2018-04-23Fix a typoFelix Yan1-1/+1
2018-04-08packages: Add missing argsJelle van der Waa1-0/+3
Add missing add_argument to parse args.
2018-04-08treewide: context must be a dict rather than ContextJelle van der Waa2-6/+6
Passing Context has been removed in Django 11, a dict should rather be passed.
2018-04-08Update urls.py to non relative importsJelle van der Waa2-6/+5
2018-04-08Change urls.py from patterns to list of url()Johannes Löthberg2-42/+44
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-04-08populate_signoffs: NoArgsCommand removed in Django 1.10Jelle van der Waa1-3/+3
Update the code to use BaseCommand instead of the removed NoArgsCommand.
2018-04-08templatetags: use render_html for rendering html tagsJelle van der Waa1-1/+2
2018-02-18Misc fixes (#84)jelle van der Waa1-0/+40
* Update coveragerc to exclude newly located tests There are now tests under main/tests/* etc, which should be omitted for coverage. * omit settings from coverage settings and local_settings aren't interesting for coverage, omit them. * remove leftover secure context processor The secure context processor was used to determine if the cdn served assets should be loaded over https or http. Since assets are no longer served with a cdn and the whole site is loaded over https these days, this code is dead and can be removed. * packages: Add test for flagging packages out of date Add simple test cases for flagging packages out of date, should later be improved to query the Package model for packages and use that data instead of hardcoding.
2018-01-04Add more basic url tests (#76)jelle van der Waa1-0/+56
* packages: Add test for differences view Add a simple test to check if the differences view renders. * packages: Add tests for more urls Add basic tests for /packages/ related urls. * mirrors: Add mirrorlist urls
2018-01-04Add opensearch tests (#75)jelle van der Waa1-0/+16
2018-01-02Add pagination to JSON package search (#73)release_2018-01-02Johannes Löthberg2-9/+46
* Add pagination to JSON search form using Paginator The downside of this is that we can't easily run prefetch_related anymore, but given the limit I don't suspect this to be a problem. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> * packages/views/search: Add appropriate newlines to search_json Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> * Update package fixture to be the same as devel/fixtures/core.db.tar.gz Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> * packages/tests: Add tests for JSON search pagination Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-12-29packages/test: Fix shadowed test name (#72)Johannes Löthberg1-1/+1
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-11-28Return different dep types under different keys in JSON resultsJohannes Löthberg1-1/+7
* Return different dep types under different keys in JSON results * packages/utils: Put dependency type list above class Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-11-26packages: Add tests for json and normal package searchJelle van der Waa1-0/+88
Test all known scenario's and easy to test search scenario's.
2017-11-15Update differences view for dropping i686Jelle van der Waa2-11/+3
Remove the i686 and x86_64 comparison since i686 is dropped and change the multilib difference to compare against x86_64 instead of i686.