def test_show_ops(self):
        bill = self._build_sample_bill()
        url = self._build_sample_url()

        LOGGER.warning(GraphQLClient.build_merge_operation(bill))
        LOGGER.warning(GraphQLClient.build_link_operation(url.id, bill.id))
        LOGGER.warning(
            GraphQLClient.build_link_operation(url.id, bill.id, remove=True))
        LOGGER.warning(
            GraphQLClient.build_get_operation(bill.id, ['id', 'name']))
        LOGGER.warning(GraphQLClient.build_delete_operation(bill.id))
        LOGGER.warning(
            GraphQLClient.build_get_all_operation(
                'bill', ['id', 'name', 'bill_number']))
        LOGGER.warning(
            GraphQLClient.build_get_all_operation('committee', ['id', 'name']))
        LOGGER.warning(
            GraphQLClient.build_get_all_operation(
                'minutes', ['id', 'name', 'start_date_time']))
        LOGGER.warning(GraphQLClient.build_get_all_news_operation(['id']))
        LOGGER.warning(
            GraphQLClient.build_get_all_news_operation(
                ['id', 'title', 'published_at'],
                datetime(year=2020, month=1, day=1),
                datetime(year=2020, month=2, day=1)))

        bulk_op = Operation(Mutation)
        bulk_op = GraphQLClient.build_merge_operation(bill, bulk_op)
        bulk_op = GraphQLClient.build_link_operation(url.id, bill.id, bulk_op)
        LOGGER.warning(bulk_op)
Exemple #2
0
    def test_show_ops(self):
        bill = self._build_sample_bill()
        url = self._build_sample_url()

        LOGGER.warning(GraphQLClient.build_merge_operation(bill))
        LOGGER.warning(GraphQLClient.build_link_operation(url.id, bill.id))
        LOGGER.warning(
            GraphQLClient.build_link_operation(url.id, bill.id, remove=True))
        LOGGER.warning(
            GraphQLClient.build_get_operation(bill.id, ['id', 'name']))
        LOGGER.warning(GraphQLClient.build_delete_operation(bill.id))
        LOGGER.warning(
            GraphQLClient.build_get_all_operation(
                'bill', ['id', 'name'], _BillFilter({'name_contains': '公文書'})))

        bulk_op = Operation(Mutation)
        bulk_op = GraphQLClient.build_merge_operation(bill, bulk_op)
        bulk_op = GraphQLClient.build_link_operation(url.id, bill.id, bulk_op)
        LOGGER.warning(bulk_op)