# -*- coding: utf-8 -*-
import unittest

from openprocurement.api.tests.base import snitch
from openprocurement.tender.belowthreshold.tests.base import (
    TenderContentWebTest, test_lots
)
from openprocurement.tender.belowthreshold.tests.question_blanks import (
    # TenderQuestionResourceTest
    create_tender_question_invalid,
    create_tender_question,
    patch_tender_question,
    get_tender_question,
    get_tender_questions,
    # TenderLotQuestionResourceTest
    lot_create_tender_question,
    lot_patch_tender_question
)


class TenderQuestionResourceTest(TenderContentWebTest):
    test_tender_status = 'active.tendering'

    test_create_tender_question_invalid = snitch(create_tender_question_invalid)
    test_create_tender_question = snitch(create_tender_question)
    test_patch_tender_question = snitch(patch_tender_question)
    test_get_tender_question = snitch(get_tender_question)
    test_get_tender_questions = snitch(get_tender_questions)


class TenderLotQuestionResourceTest(TenderContentWebTest):
    initial_lots = 2 * test_lots

    test_lot_create_tender_question = snitch(lot_create_tender_question)
    test_lot_patch_tender_question = snitch(lot_patch_tender_question)


def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(TenderQuestionResourceTest))
    suite.addTest(unittest.makeSuite(TenderLotQuestionResourceTest))
    return suite


if __name__ == '__main__':
    unittest.main(defaultTest='suite')

@@ -572,76 +572,22 @@
 Test
-(TenderContentWebTest):%0A    test_tender_status = 'active.tendering'%0A
+Mixin(object):
 %0A   
@@ -665,38 +665,35 @@
 valid)%0A    test_
-create
+get
 _tender_question
@@ -694,38 +694,35 @@
 estion = snitch(
-create
+get
 _tender_question
@@ -732,21 +732,19 @@
    test_
-patch
+get
 _tender_
@@ -743,32 +743,33 @@
 _tender_question
+s
  = snitch(patch_
@@ -762,21 +762,19 @@
  snitch(
-patch
+get
 _tender_
@@ -777,38 +777,178 @@
 der_question
+s
 )%0A
-    test_get
+%0A%0Aclass TenderQuestionResourceTest(TenderContentWebTest, TenderQuestionResourceTestMixin):%0A    test_tender_status = 'active.tendering'%0A%0A    test_create
 _tender_ques
@@ -953,35 +953,38 @@
 estion = snitch(
-get
+create
 _tender_question
@@ -986,35 +986,37 @@
 stion)%0A    test_
-get
+patch
 _tender_question
@@ -1007,33 +1007,32 @@
 _tender_question
-s
  = snitch(get_te
@@ -1017,35 +1017,37 @@
 estion = snitch(
-get
+patch
 _tender_question
@@ -1038,33 +1038,32 @@
 _tender_question
-s
 )%0A%0A%0Aclass Tender

create basic abstract classes for question module