Example #1
0
    def setUp(self):
        super(StatusActiveRectificationDocumentTest, self).setUp()

        procedure = ProcedureMachine()
        procedure.set_db_connector(self.db)
        change_machine_state(procedure, 'active.rectification')
        self.procedure = procedure
 def setUp(self):
     super(CreateAuctionResourceTest, self).setUp()
     procedure = ProcedureMachine()
     procedure.set_db_connector(self.db)
     change_machine_state(procedure, 'create')
     context = procedure.snapshot(dump=False)
     self.auction = context['auction']['data']
    def setUp(self):
        super(DraftAuctionDumpTest, self).setUp()

        procedure = ProcedureMachine()
        procedure.set_db_connector(self.db)
        change_machine_state(procedure, 'draft')
        context = procedure.snapshot()
        self.auction = context['auction']
    def setUp(self):
        super(RectificationAuctionDocumentsDumpTest, self).setUp()

        procedure = ProcedureMachine()
        procedure.set_db_connector(self.db)
        change_machine_state(procedure, 'active.rectification')
        context = procedure.snapshot()
        self.auction = context['auction']
        self.ENTRYPOINT = '/auctions/{}/documents?acc_token={}'.format(
            self.auction['data']['id'], self.auction['access']['token'])
    def setUp(self):
        super(StatusDraftInvalidAuctionPeriodTest, self).setUp()
        procedure = ProcedureMachine()
        procedure.set_db_connector(self.db)
        change_machine_state(procedure, 'draft')
        context = procedure.snapshot(
            fixture=AUCTION_WITH_INVALID_AUCTON_PERIOD)

        auction = context['auction']

        entrypoints = {}

        entrypoints['patch_auction'] = '/auctions/{}?acc_token={}'.format(
            auction['data']['id'], auction['access']['token'])
        self.auction = auction
        self.ENTRYPOINTS = entrypoints
    def setUp(self):
        super(StatusDraftTest, self).setUp()
        procedure = ProcedureMachine()
        procedure.set_db_connector(self.db)
        change_machine_state(procedure, 'draft')
        context = procedure.snapshot()

        auction = context['auction']

        entrypoints = {}

        entrypoints['get_auction'] = '/auctions/{}'.format(
            auction['data']['id'])
        entrypoints['patch_auction'] = '/auctions/{}?acc_token={}'.format(
            auction['data']['id'], auction['access']['token'])
        self.auction = auction
        self.ENTRYPOINTS = entrypoints
Example #7
0
    def setUp(self):
        super(StatusActiveRectificationChangeFieldTest, self).setUp()

        procedure = ProcedureMachine()
        procedure.set_db_connector(self.db)
        change_machine_state(procedure, 'active.rectification')
        context = procedure.snapshot()
        self.auction = context['auction']
        self.items = context['items']

        entrypoints = {}

        entrypoints['patch_auction'] = '/auctions/{}?acc_token={}'.format(
            self.auction['data']['id'], self.auction['access']['token'])
        entrypoints['post_question'] = '/auctions/{}/questions'.format(
            self.auction['data']['id'])
        entrypoints['get_auction'] = '/auctions/{}'.format(
            self.auction['data']['id'])

        self.ENTRYPOINTS = entrypoints