Remove broken tests
since they didn't test anything meaningful..
This commit is contained in:
parent
58cae6c435
commit
48313f5ed2
|
@ -1,45 +0,0 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
|
||||
from unittest import TestCase
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from rattail.commands import batch as mod
|
||||
from rattail.config import make_config
|
||||
from rattail.commands import Command
|
||||
from rattail.db import Session
|
||||
from rattail.core import Object
|
||||
|
||||
|
||||
class TestBatchHandlerCommand(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.config = self.make_config()
|
||||
self.command = self.make_command()
|
||||
self.subcommand = self.make_subcommand()
|
||||
|
||||
def make_config(self):
|
||||
return make_config([], extend=False)
|
||||
|
||||
def make_command(self):
|
||||
command = Command(self.config)
|
||||
return command
|
||||
|
||||
def make_subcommand(self):
|
||||
return mod.BatchHandlerCommand(self.command)
|
||||
|
||||
def test_get_handler(self):
|
||||
engine = sa.create_engine('sqlite://')
|
||||
model = self.config.get_model()
|
||||
model.Base.metadata.create_all(bind=engine)
|
||||
session = Session(bind=engine)
|
||||
|
||||
# TODO: these things should self-register somehow instead
|
||||
self.config.setdefault('rattail.batch', 'handheld.handler',
|
||||
'rattail.batch.handheld:HandheldBatchHandler')
|
||||
|
||||
# subcommand makes its own handler, for e.g. handheld batch
|
||||
args = Object(batch_type='handheld')
|
||||
handler = self.subcommand.get_handler(args)
|
||||
self.assertIsNotNone(handler)
|
||||
self.assertEqual(handler.batch_key, 'handheld')
|
Loading…
Reference in a new issue