Skip to content

Commit

Permalink
test_payload pass document and extra
Browse files Browse the repository at this point in the history
  • Loading branch information
tgbugs committed Oct 16, 2019
1 parent 5fddd2a commit b2b53f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Reminder to use the api-test group to run the tests in this folder.
If you ar running tests manually you will need to point to a postgres instance.
If you are running tests manually you will need to point to a postgres instance.
For example
``` bash
TEST_DATABASE_URL="postgresql://postgres@localhost:54321/htest" PYTHONWARNINGS=ignore pytest test
Expand Down
16 changes: 9 additions & 7 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@

class TestCreateAnno(unittest.TestCase):
def test_payload(self):
kwargs = dict(url='this is a url i swear',
prefix='some prefix text',
exact='my exact text',
suffix='some suffix text',
text='angry words being written about the exact text',
tags='TEST:WHYHAVEYOUDONETHIS')
args = tuple(kwargs.values())
kwargs = (('url', 'this is a url i swear'),
('prefix', 'some prefix text'),
('exact', 'my exact text'),
('suffix', 'some suffix text'),
('text', 'angry words being written about the exact text'),
('tags', 'TEST:WHYHAVEYOUDONETHIS'),
('document', None),
('extra', None),)
args = tuple(b for a, b in kwargs)
payload = h.make_annotation_payload_with_target_using_only_text_quote(*args)


Expand Down

0 comments on commit b2b53f8

Please sign in to comment.