To check that you don't make a connection you'd probably need a mock to
replace the default GD connection class with one that raises an error if we
do try to connect. In the meantime adding a comment or two to the code to
explain why we're doing things this way is probably enough.


On Wed, Apr 17, 2013 at 1:01 AM, Maxime Verger-Del Bove <
notifications@github.com> wrote:

> In tests/test_dataset.py:
>
> > @@ -58,6 +59,16 @@ def test_sli_manifest(self):
> >              sli_manifest = dataset.get_sli_manifest()
> >              self.assertIsInstance(sli_manifest, dict)
> >
> > +    def test_no_upload(self):
> > +        csv_file = os.path.join(os.path.abspath('./'), 'tmp.csv')
> > +        for (example, ExampleDataset) in examples.examples:
> > +            dataset = ExampleDataset(self.project)
> > +            dataset.upload(
> > +                no_upload=True, keep_csv=True,
> > +                csv_file=csv_file
> > +            )
> > +            os.remove(csv_file)
>
> these checks are done in test_archiver.py file (
> https://github.com/Work4Labs/gooddata-python/blob/191608d55354e6db597640733a1f1f66c9758041/tests/test_archiver.py).
> There is no need to test them here I think. It's true that basically, this
> test nothing but the fact that no exception raises due to the use of
> no_upload and keep_csv keywords. In fact, I would like to check that no
> connection to GD API is made, but I don't know how exactly...
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Work4Labs/gooddata-python/pull/4/files#r3827985>
> .
>