def test_widget_to_dictionary_throws_when_not_usercijob_instance(self): exception_raised = False try: views.widget_to_dictionary(1) except TypeError: exception_raised = True self.assertTrue(exception_raised)
def test_widget_to_dictionary_returns_complete_dictionary_when_usercijob_instance(self): proper_data = dict( pk = self.job1.pk, ci_server = self.job1.ci_server.pk, hostname = self.job1.ci_server.hostname, jobname = self.job1.jobname, displayname = self.job1.displayname, status = self.job1.status, readonly = self.job1.readonly, icon = self.job1.icon, user = self.job1.user.pk, entity_active = self.job1.entity_active, appletv = self.job1.appletv, appletv_active = self.job1.appletv_active, ) self.assertEqual(views.widget_to_dictionary(self.job1), proper_data)
def test_widget_to_dictionary_returns_complete_dictionary_when_usercijob_instance( self): proper_data = dict( pk=self.job1.pk, ci_server=self.job1.ci_server.pk, hostname=self.job1.ci_server.hostname, jobname=self.job1.jobname, displayname=self.job1.displayname, width=self.job1.width, height=self.job1.height, status=self.job1.status, readonly=self.job1.readonly, icon=self.job1.icon, user=self.job1.user.pk, entity_active=self.job1.entity_active, appletv=self.job1.appletv, appletv_active=self.job1.appletv_active, ) self.assertEqual(views.widget_to_dictionary(self.job1), proper_data)
def test_widget_to_dictionary_returns_dictionary_when_usercijob_instance(self): self.assertEqual(type(views.widget_to_dictionary(self.job1)), type(dict()))
def test_widget_to_dictionary_returns_dictionary_when_usercijob_instance( self): self.assertEqual(type(views.widget_to_dictionary(self.job1)), type(dict()))