import unittest

from eadred.management.commands import generatedata


def test_generatedata():
    """Basic test to make sure function gets called."""
    from testproject.testapp import sampledata

    assert sampledata.called == False
    cmd = generatedata.Command()
    cmd.execute()
    assert sampledata.called == True

from eadred.management.commands import generatedata


def test_generatedata():
    """Basic test to make sure function gets called."""
    from testproject.testapp import sampledata

    assert sampledata.called == False
    cmd = generatedata.Command()
    cmd.run_from_argv(['manage.py', ''])
    assert sampledata.called == True

Fix test to catch options issues
Fix test to catch options issues

The test should now catch the issue that was fixed in 79a453f.

- import unittest
- 
  from eadred.management.commands import generatedata
  
  
  def test_generatedata():
      """Basic test to make sure function gets called."""
      from testproject.testapp import sampledata
  
      assert sampledata.called == False
      cmd = generatedata.Command()
-     cmd.execute()
+     cmd.run_from_argv(['manage.py', ''])
      assert sampledata.called == True
  
Fix test to catch options issues
## Code Before:
import unittest

from eadred.management.commands import generatedata


def test_generatedata():
    """Basic test to make sure function gets called."""
    from testproject.testapp import sampledata

    assert sampledata.called == False
    cmd = generatedata.Command()
    cmd.execute()
    assert sampledata.called == True

## Instruction:
Fix test to catch options issues
## Code After:
from eadred.management.commands import generatedata


def test_generatedata():
    """Basic test to make sure function gets called."""
    from testproject.testapp import sampledata

    assert sampledata.called == False
    cmd = generatedata.Command()
    cmd.run_from_argv(['manage.py', ''])
    assert sampledata.called == True
