File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ name : unit tests
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-18.04
12+ strategy :
13+ matrix :
14+ python-version : [3.6, 3.7, 3.8, 3.9]
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Set up Python ${{ matrix.python-version }}
18+ uses : actions/setup-python@v2
19+ with :
20+ python-version : ${{ matrix.python-version }}
21+ - name : Install Ubuntu dependencies
22+ run : sudo apt-get -y install gettext appstream pkg-config libcairo2-dev gir1.2-gtk-3.0 libgirepository1.0-dev libicu-dev
23+ - name : Install Python dependencies
24+ run : |
25+ python -m pip install --upgrade pip wheel
26+ pip install pycairo PyGObject pytest PyYAML jsonschema pyICU
27+ python -m pip install git+https://github.com/Nick-Hall/gramps@tests#egg=gramps
28+ pip install .
29+ pip list
30+ - name : Test with pytest
31+ run : |
32+ pytest
Original file line number Diff line number Diff line change @@ -183,6 +183,8 @@ def test_reset_password(self):
183183 matches = re .findall (r".*jwt=([^\s]+).*" , body )
184184 self .assertEqual (len (matches ), 1 , msg = body )
185185 token = matches [0 ]
186+ if token [:2 ] == "3D" :
187+ token = token [2 :]
186188 # try without token!
187189 rv = self .client .post (
188190 BASE_URL + "/users/-/password/reset/" , json = {"new_password" : "789" },
@@ -194,7 +196,7 @@ def test_reset_password(self):
194196 headers = {"Authorization" : "Bearer {}" .format (token )},
195197 json = {"new_password" : "" },
196198 )
197- self .assertEqual (rv .status_code , 400 )
199+ self .assertEqual (rv .status_code , 400 , msg = "Invalid token: {}" . format ( token ) )
198200 # now that should work
199201 rv = self .client .post (
200202 BASE_URL + "/users/-/password/reset/" ,
You can’t perform that action at this time.
0 commit comments