<commit_before>import httpretty

from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.product import Product


class TestProduct(BaseTestCase):

    @httpretty.activate
    def test_product_create(self):
        """Method defined to test product creation."""
        httpretty.register_uri(
            httpretty.POST,
            self.endpoint_url("/product"),
            content_type='text/json',
            body='{"status": true,  "message": "Product successfully created"}',
            status=201,
        )

        response = Product.create(
            name="Product pypaystack test", description="my test description",
            price=500000, currency="NGN"
        )
        self.assertTrue(response['status'])

    @httpretty.activate
    def test_product_list(self):
        """Function defined to test Product list method."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/product"),
            content_type='text/json',
            body='{"status": true, "message": "Products retrieved", "data":[{}], "meta":{}}',
            status=201,
        )

        response = Product.list()
        self.assertEqual(response['status'], True)

    @httpretty.activate
    def test_product_fetch(self):
        """Function defined to test Product list method."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/product/5499"),
            content_type='text/json',
            body='{"status": true, "message": "Products retrieved", "data":[{}]}',
            status=201,
        )

        response = Product.fetch(5499)
        self.assertEqual(response['status'], True)

    @httpretty.activate
    def test_product_fetch(self):
        """Function defined to test Product list method."""
        httpretty.register_uri(
            httpretty.PUT,
            self.endpoint_url("/product/5499"),
            content_type='text/json',
            body='{"status": true, "message": "Products retrieved", "data":[{}]}',
            status=201,
        )

        response = Product.update(product_id=5499, name="Product pypaystack test",
            description="my test description", price=500000000,
            currency="USD"
        )
        self.assertEqual(response['status'], True)
<commit_msg>Fix poor coverage<commit_after>import httpretty

from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.product import Product


class TestProduct(BaseTestCase):

    @httpretty.activate
    def test_product_create(self):
        """Method defined to test product creation."""
        httpretty.register_uri(
            httpretty.POST,
            self.endpoint_url("/product"),
            content_type='text/json',
            body='{"status": true,  "message": "Product successfully created"}',
            status=201,
        )

        response = Product.create(
            name="Product pypaystack test", description="my test description",
            price=500000, currency="NGN"
        )
        self.assertTrue(response['status'])

    @httpretty.activate
    def test_product_list(self):
        """Function defined to test Product list method."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/product"),
            content_type='text/json',
            body='{"status": true, "message": "Products retrieved", "data":[{}], "meta":{}}',
            status=201,
        )

        response = Product.list()
        self.assertEqual(response['status'], True)

    @httpretty.activate
    def test_product_fetch(self):
        """Function defined to test Product fetch method."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/product/5499"),
            content_type='text/json',
            body='{"status": true, "message": "Products retrieved", "data":[{}]}',
            status=201,
        )

        response = Product.fetch(5499)
        self.assertEqual(response['status'], True)

    @httpretty.activate
    def test_product_update(self):
        """Function defined to test Product update method."""
        httpretty.register_uri(
            httpretty.PUT,
            self.endpoint_url("/product/5499"),
            content_type='text/json',
            body='{"status": true, "message": "Products retrieved", "data":[{}]}',
            status=201,
        )

        response = Product.update(product_id=5499, name="Product pypaystack test",
            description="my test description", price=500000000,
            currency="USD"
        )
        self.assertEqual(response['status'], True)

{'fraction_non_alphanumeric': 0.12908777969018934, 'fraction_numerical': 0.018502581755593803, 'mean_word_length': 2.381090909090909, 'pattern_counts': {'":': 24, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6698654', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1210, 'n_words': 256}