Пример #1
0
    def test_submit_ticket(self, submit_ticket):
        """Verify form post."""
        subject = 'A new ticket'
        body = 'Lorem ipsum dolor sit amet'
        cat = 'account'

        response = post(self.client,
                        'questions.marketplace_aaq_category',
                        {'subject': subject, 'body': body, 'category': cat},
                        args=['account'])
        eq_(200, response.status_code)
        submit_ticket.assert_called_with(self.user.email, cat, subject, body)
Пример #2
0
    def test_submit_developer_request(self, submit_ticket):
        """Verify refund requst form post."""
        subject = "Please review my app!"
        body = "PLEASE!!"
        cat = "Review Process"

        response = post(
            self.client, "questions.marketplace_developer_request", {"subject": subject, "body": body, "category": cat}
        )
        eq_(200, response.status_code)
        body = "Category: Review Process\nPLEASE!!"
        submit_ticket.assert_called_with(self.user.email, cat, subject, body)
Пример #3
0
    def test_submit_developer_request(self, submit_ticket):
        """Verify refund requst form post."""
        subject = 'Please review my app!'
        body = 'PLEASE!!'
        cat = 'Review Process'

        response = post(self.client,
                        'questions.marketplace_developer_request',
                        {'subject': subject, 'body': body, 'category': cat})
        eq_(200, response.status_code)
        body = 'Category: Review Process\nPLEASE!!'
        submit_ticket.assert_called_with(self.user.email, cat, subject, body)
Пример #4
0
    def test_submit_ticket(self, submit_ticket):
        """Verify form post."""
        subject = 'A new ticket'
        body = 'Lorem ipsum dolor sit amet'
        cat = 'account'

        response = post(self.client,
                        'questions.marketplace_aaq_category',
                        {'subject': subject, 'body': body, 'category': cat},
                        args=['account'])
        eq_(200, response.status_code)
        submit_ticket.assert_called_with(
            self.user.email, cat, subject, body, [])
Пример #5
0
    def test_submit_developer_request(self, submit_ticket):
        """Verify refund requst form post."""
        subject = 'Please review my app!'
        body = 'PLEASE!!'
        cat = 'Review Process'

        response = post(self.client,
                        'questions.marketplace_developer_request',
                        {'subject': subject, 'body': body, 'category': cat})
        eq_(200, response.status_code)
        body = 'Category: Review Process\nPLEASE!!'
        submit_ticket.assert_called_with(
            self.user.email, cat, subject, body, [])
Пример #6
0
    def test_submit_refund_request(self, submit_ticket):
        """Verify refund requst form post."""
        subject = 'Please refund me!'
        body = 'NOW!!'
        cat = 'Defective'
        transaction_id = 'qwerty12345'

        response = post(self.client,
                        'questions.marketplace_refund',
                        {'subject': subject, 'body': body, 'category': cat,
                         'transaction_id': transaction_id})
        eq_(200, response.status_code)
        body = 'Transaction ID: qwerty12345\nCategory: Defective\nNOW!!'
        submit_ticket.assert_called_with(self.user.email, cat, subject, body)
Пример #7
0
    def test_submit_ticket(self, submit_ticket):
        """Verify form post."""
        subject = "A new ticket"
        body = "Lorem ipsum dolor sit amet"
        cat = "account"

        response = post(
            self.client,
            "questions.marketplace_aaq_category",
            {"subject": subject, "body": body, "category": cat},
            args=["account"],
        )
        eq_(200, response.status_code)
        submit_ticket.assert_called_with(self.user.email, cat, subject, body)
Пример #8
0
    def test_submit_ticket_anon(self, submit_ticket):
        """Verify form post from unauth'd user."""
        email = '*****@*****.**'
        subject = 'A new ticket'
        body = 'Lorem ipsum dolor sit amet'
        cat = 'account'

        self.client.logout()
        response = post(self.client,
                        'questions.marketplace_aaq_category',
                        {'subject': subject, 'body': body, 'category': cat,
                         'email': email},
                        args=['account'])
        eq_(200, response.status_code)
        submit_ticket.assert_called_with(email, cat, subject, body)
Пример #9
0
    def test_submit_refund_request(self, submit_ticket):
        """Verify refund requst form post."""
        subject = 'Please refund me!'
        body = 'NOW!!'
        cat = 'Defective'
        transaction_id = 'qwerty12345'

        response = post(self.client,
                        'questions.marketplace_refund',
                        {'subject': subject, 'body': body, 'category': cat,
                         'transaction_id': transaction_id})
        eq_(200, response.status_code)
        body = 'Transaction ID: qwerty12345\nCategory: Defective\nNOW!!'
        submit_ticket.assert_called_with(
            self.user.email, cat, subject, body, [])
Пример #10
0
    def test_submit_ticket_anon(self, submit_ticket):
        """Verify form post from unauth'd user."""
        email = '*****@*****.**'
        subject = 'A new ticket'
        body = 'Lorem ipsum dolor sit amet'
        cat = 'account'

        self.client.logout()
        response = post(self.client,
                        'questions.marketplace_aaq_category',
                        {'subject': subject, 'body': body, 'category': cat,
                         'email': email},
                        args=['account'])
        eq_(200, response.status_code)
        submit_ticket.assert_called_with(email, cat, subject, body, [])
Пример #11
0
    def test_submit_refund_request(self, submit_ticket):
        """Verify refund requst form post."""
        subject = "Please refund me!"
        body = "NOW!!"
        cat = "Defective"
        transaction_id = "qwerty12345"

        response = post(
            self.client,
            "questions.marketplace_refund",
            {"subject": subject, "body": body, "category": cat, "transaction_id": transaction_id},
        )
        eq_(200, response.status_code)
        body = "Transaction ID: qwerty12345\nCategory: Defective\nNOW!!"
        submit_ticket.assert_called_with(self.user.email, cat, subject, body)
Пример #12
0
    def test_submit_ticket_anon(self, submit_ticket):
        """Verify form post from unauth'd user."""
        email = "*****@*****.**"
        subject = "A new ticket"
        body = "Lorem ipsum dolor sit amet"
        cat = "account"

        self.client.logout()
        response = post(
            self.client,
            "questions.marketplace_aaq_category",
            {"subject": subject, "body": body, "category": cat, "email": email},
            args=["account"],
        )
        eq_(200, response.status_code)
        submit_ticket.assert_called_with(email, cat, subject, body)