forked from DGNum/gestioCOF
Fix tests
This commit is contained in:
parent
361ad46be4
commit
85aa56d030
2 changed files with 13 additions and 6 deletions
|
@ -4088,15 +4088,22 @@ class HistoryJSONViewTests(ViewTestCaseMixin, TestCase):
|
|||
|
||||
class AccountReadJSONViewTests(ViewTestCaseMixin, TestCase):
|
||||
url_name = "kfet.account.read.json"
|
||||
url_expected = "/k-fet/accounts/read.json"
|
||||
|
||||
http_methods = ["POST"]
|
||||
http_methods = ["GET"]
|
||||
|
||||
auth_user = "team"
|
||||
auth_forbidden = [None, "user"]
|
||||
|
||||
@property
|
||||
def url_kwargs(self):
|
||||
return {"trigramme": self.accounts["user"].trigramme}
|
||||
|
||||
@property
|
||||
def url_expected(self):
|
||||
return "/k-fet/accounts/{}/.json".format(self.accounts["user"].trigramme)
|
||||
|
||||
def test_ok(self):
|
||||
r = self.client.post(self.url, {"trigramme": "000"})
|
||||
r = self.client.get(self.url)
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
content = json.loads(r.content.decode("utf-8"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue