| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This removes some 'u' prefixes and converts simple format() calls to f-strings.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Since I am adding a test I also took time to fix all flake8 errors in
this test file, since I may add more tests in there and I prefer to work
on a coherent code base.
|
|
|
|
|
|
|
|
| |
This adds a new test and verify that the old test has the
"unknown.<extension>" format. As funny as it seems, the "image/jpeg"
Content-Type will generate a ".jpe" extension but I was expecting a more
common ".jpg" extension. This may be a bug, but this is not the subject
of this patch.
|
|
|
|
|
|
|
| |
This ensures that links to comments have the correct ID (the
ID of the Comment object) as well as fixing deletion on reports
and fixing a few other little things. I hope this fixes the #5376
issue, though cannot reproduce so unable to confirm.
|
|
|
|
|
|
|
|
|
| |
In the same fashion limit=BAD fallsback to the default value,
fallback to zero when offset=WORSE.
Also add test coverage verifying limit/offset do the right thing.
Signed-off-by: Loic Dachary <loic@dachary.org>
|
|
|
|
|
|
| |
This adds a test and improves a previous test for the ability to read
someone elses feed. Previously it was not possible however this has
since been patched and this test checks for that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new Comment link table that is used to link between some
object and then the comment object, which can be more or less any
object in Mediagoblin. The MediaComment has been renamed to
TextComment as that more aptly describes what it is. There is
migrations for these changes.
There is also the conslidation of the Report tables into a single
Report table, the same with the Notification objects. This is because
both of them split out MediaEntry and Comment versions into their own
polymorphic versions from a base, this is no longer a meaningful
distinction as comments can be anything.
|
|
|
|
|
|
|
| |
- Adds a "type" column to the Collection object and allows the
CollectionItem model to contain any object.
- Changes "items" to "num_items" as per TODO
- Renames "uploader", "creator" and "user" to a common "actor" in most places
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- Fix the "pulling the error out of excinfo" stuff for py3
- The u"" only gets embedded in the string on py2.
This commit sponsored by Jeff Gibson. Thanks, Jeff! :)
|
|
|
|
| |
This commit sponsored by Ramana Kumar. Thanks!
|
|
|
|
|
|
| |
This fixes python 3 stuff.
This commit sponsored by James Reilly. Thanks, James!
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Has some issues, will iteratively fix!
Conflicts:
mediagoblin/gmg_commands/__init__.py
mediagoblin/gmg_commands/deletemedia.py
mediagoblin/gmg_commands/users.py
mediagoblin/oauth/views.py
mediagoblin/plugins/api/views.py
mediagoblin/tests/test_api.py
mediagoblin/tests/test_edit.py
mediagoblin/tests/test_oauth1.py
mediagoblin/tests/test_util.py
mediagoblin/tools/mail.py
mediagoblin/webfinger/views.py
setup.py
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
- Add json_error and use inplace of json_response where appropriate.
- Add garbage_collection to config spec file.
- Fix bugs in both garbage collection task and test
- Handle /api/whoami when no user logged in and a test for such a case.
- Validate ID is correct and user has comment privilege to comment.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
(forgot to commit earlier)
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
other problems. I started looking at the tests in this update. This update I
spent fixing the tests to work with my new code.
--\ mediagoblin/db/migration_tools.py
--| Merging from ticket 679
--\ mediagoblin/db/migrations.py
--| Added unique constraint to Privilege.privilege_name
--\ mediagoblin/db/models.py
--| Deleted vestigial Privilege.is_admin_or_moderator method
--\ mediagoblin/templates/mediagoblin/moderation/user.html
--| Add a `Ban User` / `UnBan User` for admin
--\ mediagoblin/test/test_api.py
--| Fixed test with my new changes
--\ mediagoblin/test/test_auth.py
--| Try to fix test, still having problems
--\ mediagoblin/test/test_modelmethods.py
--| Wrote my first test for the User.has_privilege method
--\ mediagoblin/test/test_modelmethods.py
--| Fixed test with my new changes
--\ mediagoblin/test/test_sqlmigrations.py
--| Merging from ticket 679
--\ mediagoblin/test/tools.py
--| Editted add_fixture_user to allow for privileges rather than active column
|
|
|
|
|
|
| |
Revert "Always activate testing in every test module ever."
This reverts commit 0536306048daa0970d2e43411ba2a9bf073e570e.
|
|
|
|
| |
Kind of a dorky way to implement this, but...
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
By doing this, we can take advantage of py.test's ability to create
temporary directories that are then cleaned up later during testing.
This helps for sandboxing things.
This also involves a ton of changes:
- Changing the get_app stuff appropriately, getting rid of the
setup_fresh_app decorator
- Making said fixture
- Switching over a billion tests to use it
|
| |
|
|
|
|
|
|
|
| |
nosetests runs everything that even vaguely looks like a
test case... even our get_test_app. And as it is imported
everywhere... it is run everywhere as a test case. Renaming
it saves us about 10+ tests and a few seconds of time.
|
|
|
|
|
|
|
|
| |
These tests, don't need fresh databases, so don't discard and recreate
the tables. This reduces test suite runtime on my laptop from 130 to 96
seconds.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
| |
Found using the previous commit.
|
|
|