| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bbd9b63 commit f717937
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -75,28 +75,24 @@ class NewEventTester(EventTester): | |||
| 75 | 75 | assert watcher.log[1] == expect | |
| 76 | 76 | ||
| 77 | 77 | ||
| 78 | - class A(InheritableSQLObject): | ||
| 78 | + class InheritableEventTestA(InheritableSQLObject): | ||
| 79 | 79 | a = IntCol() | |
| 80 | 80 | ||
| 81 | - class B(A): | ||
| 81 | + class InheritableEventTestB(InheritableEventTestA): | ||
| 82 | 82 | b = IntCol() | |
| 83 | 83 | ||
| 84 | - class C(B): | ||
| 84 | + class InheritableEventTestC(InheritableEventTestB): | ||
| 85 | 85 | c = IntCol() | |
| 86 | 86 | ||
| 87 | + def _query(instance): | ||
| 88 | + InheritableEventTestA.get(instance.id) | ||
| 87 | 89 | ||
| 88 | - def test_inheritance_row_created(): | ||
| 89 | - setupClass(A) | ||
| 90 | - setupClass(B) | ||
| 91 | - setupClass(C) | ||
| 92 | - | ||
| 93 | - def test_query(instance): | ||
| 94 | - id = instance.id | ||
| 95 | - A.get(id) | ||
| 90 | + def _signal(kwargs, postfuncs): | ||
| 91 | + postfuncs.append(_query) | ||
| 96 | 92 | ||
| 97 | - def signal(kwargs, postfuncs): | ||
| 98 | - postfuncs.append(test_query) | ||
| 93 | + def test_inheritance_row_created(): | ||
| 94 | + setupClass([InheritableEventTestA, InheritableEventTestB, InheritableEventTestC]) | ||
| 99 | 95 | ||
| 100 | - events.listen(signal, A, events.RowCreatedSignal) | ||
| 96 | + events.listen(_signal, InheritableEventTestA, events.RowCreatedSignal) | ||
| 101 | 97 | ||
| 102 | - C(a=1, b=2, c=3) | ||
| 98 | + InheritableEventTestC(a=1, b=2, c=3) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments