Created
July 26, 2017 12:21
-
-
Save AndySun25/cc3a73dd2a02992b001b51eae52fd461 to your computer and use it in GitHub Desktop.
simplified test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_filter_child_events_by_event_type(self): | |
InsertionFactory(account=children[0].transactional_account, created_by=parent) | |
transaction_content_type = ContentType.objects.get_for_model(Transaction) | |
self._test(children[0], status.HTTP_200_OK, set(children[0].events.all()[:10])) | |
self._test(children[0], status.HTTP_200_OK, set(children[0].events.filter(content_type=transaction_content_type)[:10]), | |
{'event_type': 'transaction'}) | |
self._test(children[0], status.HTTP_200_OK, [], {'event_type': 'derp'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment