Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
00969f42
Commit
00969f42
authored
Mar 25, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix project list caching issue on ACL API tests
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
9e9fbbfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
weblate/api/tests.py
weblate/api/tests.py
+4
-1
No files found.
weblate/api/tests.py
View file @
00969f42
...
...
@@ -19,11 +19,12 @@
#
from
django.contrib.auth.models
import
User
from
django.core.cache
import
cache
from
django.core.urlresolvers
import
reverse
from
rest_framework.test
import
APITestCase
from
weblate.trans.models
import
Project
from
weblate.trans.models
.project
import
Project
,
get_acl_cache_key
from
weblate.trans.tests.utils
import
RepoTestMixin
,
get_test_file
TEST_PO
=
get_test_file
(
'cs.po'
)
...
...
@@ -58,11 +59,13 @@ class APIBaseTest(APITestCase, RepoTestMixin):
'po-mono/en.po'
,
project
=
project
,
)
cache
.
delete
(
get_acl_cache_key
(
None
))
def
authenticate
(
self
,
superuser
=
False
):
user
,
dummy
=
User
.
objects
.
get_or_create
(
username
=
'test'
)
user
.
is_superuser
=
superuser
user
.
save
()
cache
.
delete
(
get_acl_cache_key
(
user
))
self
.
client
.
credentials
(
HTTP_AUTHORIZATION
=
'Token '
+
user
.
auth_token
.
key
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment