|
@@ -1774,6 +1774,12 @@ class TestSetPasswordEndpoint(FunctionalTest):
|
1774
|
1774
|
status=204,
|
1775
|
1775
|
)
|
1776
|
1776
|
# Check After
|
|
1777
|
+ dbsession = get_tm_session(self.session_factory, transaction.manager)
|
|
1778
|
+ uapi = UserApi(
|
|
1779
|
+ current_user=admin,
|
|
1780
|
+ session=dbsession,
|
|
1781
|
+ config=self.app_config,
|
|
1782
|
+ )
|
1777
|
1783
|
user = uapi.get_one(user_id)
|
1778
|
1784
|
assert not user.validate_password('pass')
|
1779
|
1785
|
assert user.validate_password('mynewpassword')
|
|
@@ -1829,6 +1835,12 @@ class TestSetPasswordEndpoint(FunctionalTest):
|
1829
|
1835
|
params=params,
|
1830
|
1836
|
status=403,
|
1831
|
1837
|
)
|
|
1838
|
+ dbsession = get_tm_session(self.session_factory, transaction.manager)
|
|
1839
|
+ uapi = UserApi(
|
|
1840
|
+ current_user=admin,
|
|
1841
|
+ session=dbsession,
|
|
1842
|
+ config=self.app_config,
|
|
1843
|
+ )
|
1832
|
1844
|
# Check After
|
1833
|
1845
|
user = uapi.get_one(user_id)
|
1834
|
1846
|
assert user.validate_password('pass')
|
|
@@ -1887,6 +1899,12 @@ class TestSetPasswordEndpoint(FunctionalTest):
|
1887
|
1899
|
status=400,
|
1888
|
1900
|
)
|
1889
|
1901
|
# Check After
|
|
1902
|
+ dbsession = get_tm_session(self.session_factory, transaction.manager)
|
|
1903
|
+ uapi = UserApi(
|
|
1904
|
+ current_user=admin,
|
|
1905
|
+ session=dbsession,
|
|
1906
|
+ config=self.app_config,
|
|
1907
|
+ )
|
1890
|
1908
|
user = uapi.get_one(user_id)
|
1891
|
1909
|
assert user.validate_password('pass')
|
1892
|
1910
|
assert not user.validate_password('mynewpassword')
|
|
@@ -1944,6 +1962,12 @@ class TestSetPasswordEndpoint(FunctionalTest):
|
1944
|
1962
|
status=204,
|
1945
|
1963
|
)
|
1946
|
1964
|
# Check After
|
|
1965
|
+ dbsession = get_tm_session(self.session_factory, transaction.manager)
|
|
1966
|
+ uapi = UserApi(
|
|
1967
|
+ current_user=admin,
|
|
1968
|
+ session=dbsession,
|
|
1969
|
+ config=self.app_config,
|
|
1970
|
+ )
|
1947
|
1971
|
user = uapi.get_one(user_id)
|
1948
|
1972
|
assert not user.validate_password('pass')
|
1949
|
1973
|
assert user.validate_password('mynewpassword')
|