Exemple #1
0
    def test_make_table_no_resource(self):
        fake_func = Mock()
        fake_table = "DoesNotExist_{}".format(uuid.uuid4())

        with pytest.raises(AutopushException) as ex:
            _make_table(fake_func, fake_table, 5, 10, boto_resource=None)
        assert ex.value.message == "No boto3 resource provided for _make_table"
Exemple #2
0
    def test_make_table(self):
        fake_resource = Mock()
        fake_func = Mock()
        fake_table = "DoesNotExist_{}".format(uuid.uuid4())

        _make_table(fake_func, fake_table, 5, 10, boto_resource=fake_resource)
        assert fake_func.call_args[0] == (fake_table, 5, 10, fake_resource)