예제 #1
0
 def update_value(self, key_column, key_value, update_column, update_value):
     if update_value is None:
         return False
     return postgres.update_value(self.cursor, self.name, key_column,
                                  key_value, update_column, update_value)
예제 #2
0
def test_update_row_invalid(cursor):
    assert postgres.update_value(cursor, test_table_name, None, None, None, None) is False
예제 #3
0
def test_update_row_numeric(cursor):
    new_value = random_utilities.random_double()
    assert postgres.update_value(cursor, test_table_name, 'id', test_table_row_id, 'numeric_col', new_value) is True
예제 #4
0
def test_update_row_date(cursor):
    new_date = random_utilities.random_date()
    assert postgres.update_value(cursor, test_table_name, 'id', test_table_row_id, 'date_col', new_date) is True
예제 #5
0
def test_update_row_string(cursor):
    new_value = random_utilities.random_letters()
    assert postgres.update_value(cursor, test_table_name, 'id', test_table_row_id, 'id', new_value) is True