@@ -21,7 +21,11 @@ class InvoiceGQLTest(InvoiceGQLTestCase):
2121
2222 search_for_invoice_query = F'''
2323query {{
24- invoice(code_Iexact:"{ DEFAULT_TEST_INVOICE_PAYLOAD ['code' ]} "){{
24+ invoice(
25+ code_Iexact:"{ DEFAULT_TEST_INVOICE_PAYLOAD ['code' ]} ",
26+ subjectTypeFilter: "contract",
27+ thirdpartyTypeFilter: "insuree"
28+ ){{
2529 edges {{
2630 node {{
2731 isDeleted,
@@ -54,12 +58,11 @@ def test_mutation_invoice_generate_for_time_frame(self):
5458 mutation = self .create_invoice_mutation
5559 self .graph_client .execute (mutation , context = self .user_context .get_request ())
5660 signal_receiver_mock .assert_called_once_with (** _expected_call_args )
57- pass
5861
5962 def test_fetch_invoice_query (self ):
6063 output = self .graph_client .execute (self .search_for_invoice_query , context = self .user_context .get_request ())
61- expected = \
62- { 'data' : {
64+ expected = {
65+ 'data' : {
6366 'invoice' : {
6467 'edges' : [
6568 {'node' : {
@@ -71,7 +74,11 @@ def test_fetch_invoice_query(self):
7174 'thirdpartyType' : self .invoice .thirdparty_type .id ,
7275 'subjectId' : F'{ self .invoice .subject .id } ' ,
7376 'subjectType' : self .invoice .subject_type .id
74- }}]}}}
77+ }}
78+ ]
79+ }
80+ }
81+ }
7582
7683 self .assertEqual (output , expected )
7784
@@ -84,4 +91,4 @@ def setup_test_signal(self, receiver_mock):
8491 'invoice_creation_from_calculation' ,
8592 receiver_mock ,
8693 bind_type = ServiceSignalBindType .AFTER
87- )
94+ )
0 commit comments