16 lines
396 B
Python
16 lines
396 B
Python
|
# Copyright 2023 (c) Anna Schumaker.
|
||
|
"""Mock Row and Table objects for testing."""
|
||
|
import emmental.db.table
|
||
|
from gi.repository import GObject
|
||
|
|
||
|
|
||
|
class MockRow(emmental.db.table.Row):
|
||
|
"""A fake Row customized for testing."""
|
||
|
|
||
|
number = GObject.Property(type=int)
|
||
|
|
||
|
@property
|
||
|
def primary_key(self) -> int:
|
||
|
"""Get the primary key for this MockRow."""
|
||
|
return self.number
|