import pytest

from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
    BaseFactory, SingleFactory)


@pytest.mark.django_db
class TestAlbums(object):
    def test_album_factory(self):
        album = AlbumFactory()
        assert isinstance(album, Album)
        assert 'album' in album.romanized_name
        assert album.identifier == 'album'


@pytest.mark.django_db
class TestSingles(object):
    def test_single_factory(self):
        single = SingleFactory()
        assert isinstance(single, Single)
        assert 'single' in single.romanized_name
        assert single.identifier == 'single'

import pytest

from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
    BaseFactory, SingleFactory)


@pytest.mark.django_db
def test_album_factory():
    factory = AlbumFactory()
    assert isinstance(factory, Album)
    assert 'album' in factory.romanized_name
    assert factory.identifier == 'album'


@pytest.mark.django_db
def test_single_factory():
    factory = SingleFactory()
    assert isinstance(factory, Single)
    assert 'single' in factory.romanized_name
    assert factory.identifier == 'single'

Remove the class surrounding the music tests. Staying strictly functional.
Remove the class surrounding the music tests. Staying strictly functional.

  import pytest
  
  from components.merchandise.music.models import Album, Single
  from components.merchandise.music.factories import (AlbumFactory,
      BaseFactory, SingleFactory)
  
  
  @pytest.mark.django_db
- class TestAlbums(object):
-     def test_album_factory(self):
+ def test_album_factory():
-         album = AlbumFactory()
+     factory = AlbumFactory()
-         assert isinstance(album, Album)
+     assert isinstance(factory, Album)
-         assert 'album' in album.romanized_name
+     assert 'album' in factory.romanized_name
-         assert album.identifier == 'album'
+     assert factory.identifier == 'album'
  
  
  @pytest.mark.django_db
- class TestSingles(object):
-     def test_single_factory(self):
+ def test_single_factory():
-         single = SingleFactory()
+     factory = SingleFactory()
-         assert isinstance(single, Single)
+     assert isinstance(factory, Single)
-         assert 'single' in single.romanized_name
+     assert 'single' in factory.romanized_name
-         assert single.identifier == 'single'
+     assert factory.identifier == 'single'
  
Remove the class surrounding the music tests. Staying strictly functional.
## Code Before:
import pytest

from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
    BaseFactory, SingleFactory)


@pytest.mark.django_db
class TestAlbums(object):
    def test_album_factory(self):
        album = AlbumFactory()
        assert isinstance(album, Album)
        assert 'album' in album.romanized_name
        assert album.identifier == 'album'


@pytest.mark.django_db
class TestSingles(object):
    def test_single_factory(self):
        single = SingleFactory()
        assert isinstance(single, Single)
        assert 'single' in single.romanized_name
        assert single.identifier == 'single'

## Instruction:
Remove the class surrounding the music tests. Staying strictly functional.
## Code After:
import pytest

from components.merchandise.music.models import Album, Single
from components.merchandise.music.factories import (AlbumFactory,
    BaseFactory, SingleFactory)


@pytest.mark.django_db
def test_album_factory():
    factory = AlbumFactory()
    assert isinstance(factory, Album)
    assert 'album' in factory.romanized_name
    assert factory.identifier == 'album'


@pytest.mark.django_db
def test_single_factory():
    factory = SingleFactory()
    assert isinstance(factory, Single)
    assert 'single' in factory.romanized_name
    assert factory.identifier == 'single'
