Ejemplo n.º 1
0
 def test_find_iteration_wrong_mode(self):
     with pytest.raises(ValueError):
         _, _ = sansio.find_iteration("",
                                      itermode="python",
                                      iterkey="users")
Ejemplo n.º 2
0
 def test_find_iteration_not_found(self):
     with pytest.raises(ValueError):
         _, _ = sansio.find_iteration("")
Ejemplo n.º 3
0
 def test_find_iteration_custom_itermode(self):
     itermode, iterkey = sansio.find_iteration(methods.CHANNELS_LIST,
                                               itermode="timeline")
     assert itermode == "timeline"
     assert iterkey == methods.CHANNELS_LIST.value[2]
Ejemplo n.º 4
0
 def test_find_iteration_custom_iterkey(self):
     itermode, iterkey = sansio.find_iteration(methods.CHANNELS_LIST,
                                               iterkey="users")
     assert itermode == methods.CHANNELS_LIST.value[1]
     assert iterkey == "users"
Ejemplo n.º 5
0
 def test_find_iteration(self):
     itermode, iterkey = sansio.find_iteration(methods.CHANNELS_LIST)
     assert itermode == methods.CHANNELS_LIST.value[1]
     assert iterkey == methods.CHANNELS_LIST.value[2]