Example #1
0
    def test_export(self):
        """Test Type.export() method"""
        obj = db_add_and_return(Type, type_1)

        result = obj.export()
        assert result == "2-Cpx@Predicate@Cpx@True@Two-term Complex " \
                         "E.g. flicea, from fli(du)+ce(nj)a=liquid-become."
Example #2
0
    def test_export(self):
        """Test Event.export() method"""
        obj = db_add_and_return(Event, event_1)

        result = obj.export()
        assert result == "1@Start@01/01/1975@The initial " \
                         "vocabulary before updates.@Initial@INIT"
Example #3
0
    def test_export(self):
        """Test Author.export() method"""
        obj = db_add_and_return(Author, author_1)

        result = obj.export()
        assert result == "L4@Loglan 4&5@The printed-on-paper " \
                         "book, 1975 version of the dictionary."
Example #4
0
    def test_html_origin(self):
        """Test formatting 'origin' field as HTML block"""
        word = db_add_and_return(Word, word_1)

        result = word.html_origin(style="ultra")
        assert result == "<o>&lt;pru(ci)+ka(kt)o=test act&gt;</o> "

        result = word.html_origin(style="normal")
        assert result == '<span class="m_origin">&lt;pru(ci)+ka(kt)o=test act&gt;</span> '

        word.origin = None
        result = word.html_origin()
        assert result == "<o>&lt;test act&gt;</o> "

        word.origin_x = None
        result = word.html_origin()
        assert result == ""
Example #5
0
 def test_delete():
     w = db_add_and_return(Word, word_1)
     assert w.delete() is None
Example #6
0
 def test_update():
     w = db_add_and_return(Word, word_1)
     assert w.update({
         'name': 'test',
     }) is None
Example #7
0
    def test_export(self):
        """Test Setting.export() method"""
        obj = db_add_and_return(Setting, setting_1)

        result = obj.export()
        assert result == "09.10.2020 09:10:20@2@[email protected]"
Example #8
0
    def test_export(self):
        """Test Syllable.export() method"""
        obj = db_add_and_return(Syllable, syllable_35)

        result = obj.export()
        assert result == "vr@InitialCC@True"
Example #9
0
    def test_export(self):
        """Test WordSpell.export() method"""
        obj = db_add_and_return(WordSpell, word_1)

        result = obj.export()
        assert result == "7191@prukao@prukao@555555@1@9999@"