Skip to content

Instantly share code, notes, and snippets.

@tomplayford
Created October 11, 2012 13:27
Show Gist options
  • Save tomplayford/3872265 to your computer and use it in GitHub Desktop.
Save tomplayford/3872265 to your computer and use it in GitHub Desktop.
test
def test_simple_route_manipulation(self):
message = SendMessageJob()
message.to_run_datetime = datetime.datetime.now()
message.save()
id = message.id
message.routes = EnumSet(MessageRoute, initial_values=[MessageRoute.sms])
message.save()
message2 = SendMessageJob.objects.get(id=id)
ran = False
for route in message2.routes:
ran = True
self.assertEqual(route, MessageRoute.sms)
self.assertTrue(ran)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment