Commit fa177a59b9709d1b0dff793c9374c9e1d88f0809
1 parent
a2c4e9fd
Exists in
master
test attributes ok
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
wscacicneo/model/orgao.py
... | ... | @@ -201,7 +201,7 @@ class Orgao(orgao_base.metaclass): |
201 | 201 | Busca registro completo do órgao pelo nome |
202 | 202 | """ |
203 | 203 | search = Search( |
204 | - literal="document->>"+nm_orgao | |
204 | + literal="document->>'nome' = '"+nm_orgao+"'" | |
205 | 205 | ) |
206 | 206 | results = self.documentrest.get_collection(search_obj=search) |
207 | 207 | ... | ... |
wscacicneo/test/test_orgao_attributes.py
... | ... | @@ -54,7 +54,7 @@ class TestOrgaoBase(unittest.TestCase): |
54 | 54 | nm_orgao='Ministério do Planejameiaaaaaaaaanto' |
55 | 55 | search = orgao_obj.search_orgao(nm_orgao) |
56 | 56 | print(search.results) |
57 | - id = search.results[0]['_metadata']['id_doc'] | |
57 | + id = search.results[0]._metadata.id_doc | |
58 | 58 | delete = orgao_obj.delete_orgao(id) |
59 | 59 | |
60 | 60 | assert(delete == 'DELETED') | ... | ... |