コード例 #1
0
ファイル: test_targets.py プロジェクト: samirelanduk/pygtop
 def test_can_get_interactions(self, mock_json_retriever):
     mock_json_retriever.return_value = [self.interaction_json, self.interaction_json]
     target = Target(self.target_json)
     interactions = target.interactions()
     self.assertIsInstance(interactions, list)
     self.assertEqual(len(interactions), 2)
     for interaction in interactions:
         self.assertIsInstance(interaction, Interaction)
コード例 #2
0
 def test_can_get_interactions(self, mock_json_retriever):
     mock_json_retriever.return_value = [
         self.interaction_json, self.interaction_json
     ]
     target = Target(self.target_json)
     interactions = target.interactions()
     self.assertIsInstance(interactions, list)
     self.assertEqual(len(interactions), 2)
     for interaction in interactions:
         self.assertIsInstance(interaction, Interaction)
コード例 #3
0
 def test_interactions_when_no_json(self, mock_json_retriever):
     mock_json_retriever.return_value = None
     target = Target(self.target_json)
     self.assertEqual(target.interactions(), [])
コード例 #4
0
ファイル: test_targets.py プロジェクト: samirelanduk/pygtop
 def test_interactions_when_no_json(self, mock_json_retriever):
     mock_json_retriever.return_value = None
     target = Target(self.target_json)
     self.assertEqual(target.interactions(), [])