Ejemplo n.º 1
0
    def test_post_bad_product_name(self):
        products = Products(config=self.config)

        ok_(not products.post(
            product='Spaces not allowed',
            version='',
        ))
Ejemplo n.º 2
0
    def test_post_bad_product_name(self):
        products = Products(config=self.config)

        ok_(not products.post(
            product='Spaces not allowed',
            version='',
        ))
Ejemplo n.º 3
0
    def test_post_bad_product_name(self):
        products = Products(config=self.config)

        build_id = self.now.strftime('%Y%m%d%H%M')
        ok_(not products.post(
            product='Spaces not allowed',
            version='',
        ))
Ejemplo n.º 4
0
    def test_post_bad_product_name(self):
        products = Products(config=self.config)

        build_id = self.now.strftime('%Y%m%d%H%M')
        ok_(not products.post(
            product='Spaces not allowed',
            version='',
        ))
Ejemplo n.º 5
0
    def test_post(self):
        products = Products(config=self.config)

        ok_(products.post(product="KillerApp", version="1.0"))

        # let's check certain things got written to certain tables
        cursor = self.connection.cursor()
        try:
            # expect there to be a new product
            cursor.execute("select product_name from products " "where product_name=%s", ("KillerApp",))
            product_name, = cursor.fetchone()
            eq_(product_name, "KillerApp")
        finally:
            self.connection.rollback()
Ejemplo n.º 6
0
    def test_post(self):
        products = Products(config=self.config)

        ok_(products.post(
            product='KillerApp',
            version='1.0',
        ))

        # let's check certain things got written to certain tables
        cursor = self.connection.cursor()
        try:
            # expect there to be a new product
            cursor.execute(
                'select product_name from products '
                "where product_name=%s", ('KillerApp', ))
            product_name, = cursor.fetchone()
            eq_(product_name, 'KillerApp')
        finally:
            self.connection.rollback()
Ejemplo n.º 7
0
    def test_post(self):
        products = Products(config=self.config)

        build_id = self.now.strftime('%Y%m%d%H%M')
        ok_(products.post(
            product='KillerApp',
            version='1.0',
        ))

        # let's check certain things got written to certain tables
        cursor = self.connection.cursor()
        try:
            # expect there to be a new product
            cursor.execute(
                'select product_name from products '
                "where product_name=%s",
                ('KillerApp',)
            )
            product_name, = cursor.fetchone()
            eq_(product_name, 'KillerApp')
        finally:
            self.connection.rollback()