Skip to content

Commit

Permalink
Updated get_or_create test
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Sep 15, 2023
1 parent 01159f5 commit fb571b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_peewee.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from math import sqrt
import numpy as np
from peewee import AsIs, Model, PostgresqlDatabase
from peewee import Model, PostgresqlDatabase
from pgvector.peewee import VectorField

db = PostgresqlDatabase('pgvector_python_test')
Expand Down Expand Up @@ -72,4 +72,4 @@ def test_where(self):
def test_get_or_create(self):
Item.get_or_create(id=1, defaults={'embedding': [1, 2, 3]})
Item.get_or_create(embedding=np.array([4, 5, 6]))
Item.get_or_create(embedding=AsIs([7, 8, 9]))
Item.get_or_create(embedding=Item.embedding.to_value([7, 8, 9]))

0 comments on commit fb571b5

Please sign in to comment.