def test_post_bad_product_name(self): products = ProductVersions(config=self.config) ok_(not products.post( product='Spaces not allowed', version='', ))
def test_post_bad_product_name(self): products = ProductVersions(config=self.config) ok_(not products.post( product='Spaces not allowed', version='', ))
def test_post(self): products = ProductVersions(config=self.config) assert 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() assert product_name, 'KillerApp' finally: self.connection.rollback()