Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uffd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rixx
uffd
Commits
aa0ba6dd
Verified
Commit
aa0ba6dd
authored
4 years ago
by
sistason
Browse files
Options
Downloads
Patches
Plain Diff
change init import to better compatible with the rest of the code
parent
6fda43a0
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/test_user.py
+1
-1
1 addition, 1 deletion
tests/test_user.py
tests/utils.py
+1
-1
1 addition, 1 deletion
tests/utils.py
uffd/__init__.py
+2
-2
2 additions, 2 deletions
uffd/__init__.py
with
4 additions
and
4 deletions
tests/test_user.py
+
1
−
1
View file @
aa0ba6dd
...
@@ -153,7 +153,7 @@ class TestUserViews(UffdTestCase):
...
@@ -153,7 +153,7 @@ class TestUserViews(UffdTestCase):
self
.
assertEqual
(
_user
.
mail
,
'
newuser@example.com
'
)
self
.
assertEqual
(
_user
.
mail
,
'
newuser@example.com
'
)
self
.
assertEqual
(
_user
.
uid
,
user
.
uid
)
self
.
assertEqual
(
_user
.
uid
,
user
.
uid
)
self
.
assertEqual
(
_user
.
loginname
,
user
.
loginname
)
self
.
assertEqual
(
_user
.
loginname
,
user
.
loginname
)
self
.
assertTrue
(
ldap
.
test_user_bind
(
_
user
.
dn
,
'
userpassword
'
))
self
.
assertTrue
(
ldap
.
test_user_bind
(
user
.
dn
,
'
userpassword
'
))
self
.
assertEqual
(
roles
,
[
'
base
'
,
'
role1
'
])
self
.
assertEqual
(
roles
,
[
'
base
'
,
'
role1
'
])
def
test_update_password
(
self
):
def
test_update_password
(
self
):
...
...
This diff is collapsed.
Click to expand it.
tests/utils.py
+
1
−
1
View file @
aa0ba6dd
...
@@ -15,7 +15,7 @@ def dump(basename, resp):
...
@@ -15,7 +15,7 @@ def dump(basename, resp):
return
return
os
.
makedirs
(
root
,
exist_ok
=
True
)
os
.
makedirs
(
root
,
exist_ok
=
True
)
path
=
os
.
path
.
join
(
root
,
basename
+
suffix
)
path
=
os
.
path
.
join
(
root
,
basename
+
suffix
)
with
open
(
path
,
'
x
b
'
)
as
f
:
with
open
(
path
,
'
w
b
'
)
as
f
:
f
.
write
(
resp
.
data
)
f
.
write
(
resp
.
data
)
def
db_flush
():
def
db_flush
():
...
...
This diff is collapsed.
Click to expand it.
uffd/__init__.py
+
2
−
2
View file @
aa0ba6dd
...
@@ -12,7 +12,7 @@ sys.path.append('deps/ldapalchemy')
...
@@ -12,7 +12,7 @@ sys.path.append('deps/ldapalchemy')
# pylint: disable=wrong-import-position
# pylint: disable=wrong-import-position
from
uffd.database
import
db
,
SQLAlchemyJSON
from
uffd.database
import
db
,
SQLAlchemyJSON
from
uffd.ldap
import
ldap
import
uffd.
ldap
from
uffd.template_helper
import
register_template_helper
from
uffd.template_helper
import
register_template_helper
from
uffd.navbar
import
setup_navbar
from
uffd.navbar
import
setup_navbar
# pylint: enable=wrong-import-position
# pylint: enable=wrong-import-position
...
@@ -67,7 +67,7 @@ def create_app(test_config=None): # pylint: disable=too-many-locals
...
@@ -67,7 +67,7 @@ def create_app(test_config=None): # pylint: disable=too-many-locals
@app.shell_context_processor
@app.shell_context_processor
def
push_request_context
():
#pylint: disable=unused-variable
def
push_request_context
():
#pylint: disable=unused-variable
app
.
test_request_context
().
push
()
# LDAP ORM requires request context
app
.
test_request_context
().
push
()
# LDAP ORM requires request context
return
{
'
db
'
:
db
,
'
ldap
'
:
ldap
}
return
{
'
db
'
:
db
,
'
ldap
'
:
uffd
.
ldap
.
ldap
}
@app.route
(
"
/
"
)
@app.route
(
"
/
"
)
def
index
():
#pylint: disable=unused-variable
def
index
():
#pylint: disable=unused-variable
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment